Search Results - CodeGuru Forums
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: Peter_B

Page 1 of 25 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    4
    Views
    957

    Re: DrawString function

    This is just anti-aliasing. You can control how text is rendered using the Graphics.TextRenderingHint property
  2. Replies
    7
    Views
    28,990

    Re: History Of Debugging...

    The way I've always understood this is that the term 'bug' had been used to describe all sorts of faults in mechanical items for a long time, but when this moth was found it helped to popularise the...
  3. Replies
    7
    Views
    28,990

    Re: History Of Debugging...

    If it is a hoax, someone should tell the US Navy - they named a guided-missile destroyer after her: http://www.hopper.navy.mil/ :D

    She was also the first person to develop a compiler - see...
  4. Replies
    6
    Views
    9,601

    Re: Help: 2-dimensional array

    You can't even be bothered to wrap this up into a complete program and run it to get the answer, yet you expect us to write two programs for you? :mad:
  5. Replies
    3
    Views
    199

    Re: operator new without implementation?

    Your example is really no different to

    class A
    {
    private:
    void* someFunction();
    };

    int main()
    {
  6. Replies
    11
    Views
    1,078

    Re: Input Validation Error Using Arrays

    FlexeLint isn't a compiler, it is a static code analysis tool. I.e. you can use it as a supplementary tool in conjunction with a compiler. Compilers nowadays are adding more and more warnings for...
  7. Replies
    11
    Views
    1,078

    Re: Input Validation Error Using Arrays

    This is the sort of bug that programs like lint can help with. Using the online demo of FlexeLint at http://www.gimpel-online.com/OnlineTesting.html (choose the Simple Example (C++) and replace the...
  8. Replies
    16
    Views
    577

    Re: Code does not work!!!

    Yes, I got it wrong with the string literal bit :o mathmari's code wasn't trying to alter the literal itself, but rather the copy which is in the char array. Thanks for correcting me. I'm so used to...
  9. Replies
    16
    Views
    577

    Re: Code does not work!!!

    You have a little bug in func(). Run it through the debugger -you'll spot it eventually... :D

    Also, don't use gets() - it's dangerous, and has been deprecated. For input it is safer to use streams...
  10. Replies
    16
    Views
    577

    Re: Code does not work!!!

    Either:
    1) Change to use std::string instead of char arrays, or
    2) Create a char array on the heap using new and initialize this array to contain "VENICE" (plus the null-terminator)
  11. Replies
    16
    Views
    577

    Re: Code does not work!!!

    You are trying to modify a string literal ("VENICE"). This will cause undefined behaviour.
  12. Replies
    8
    Views
    189

    Re: A question regarding reallocation

    @LarryChen: Don't assume the answer will always be the same as this, though. On my system (Ubuntu Linux using g++ 4.2.3) the following code (Philip Nicoletti's code with some output added):

    ...
  13. Replies
    7
    Views
    380

    Re: Binary file-question!!!

    int main()
    {
    int il;
    FILE *fp;
    fp=fopen("sx.txt","rb");
    if (fp==NULL){
    printf("Problem!!!\n");
    exit(0);
    }
    fseek(fp,4,0);
  14. Replies
    7
    Views
    380

    Re: Binary file-question!!!

    Depends upon how it should work :). Either:
    1) Change the code to read the file as plain-text, or
    2) Change the file so the data is binary-coded.
  15. Replies
    7
    Views
    380

    Re: Binary file-question!!!

    Your file is in plain-text format but you are reading it as if it is a binary-coded format. That's why you get what looks to be junk.
  16. Replies
    6
    Views
    687

    Re: Currently active users

    Recently, whenever I have looked at the 'Who's Online' page I get the same effect. But the split is always at the same user.
    I.e. the first page is everyone upto (and including) lfuser.
    The second...
  17. Replies
    8
    Views
    1,980

    Re: Finding if a Palindrom - Please review

    Remember to always check the code works for corner cases. For example, what will this code do for a zero-length string? Hint: it will try to access an invalid index.
  18. Re: Binary Tree Post-Order Traversal Issue

    Yes, I thought this was probably what was wrong.
    Symus, when you originally coded postorder did you copy and paste preorder and just move the cout line?
  19. Re: Binary Tree Post-Order Traversal Issue

    You must have made a mistake somewhere - it works fine for me. NB: when I said exactly as preorder, except... I meant the same structure. I.e. the postorder method would call the postorder method for...
  20. Re: Binary Tree Post-Order Traversal Issue

    Why are your preorder and postorder methods structured differently? You could have written postorder exactly as preorder, except with the 'cout << data' part at the end. There is no need for it to...
  21. Replies
    3
    Views
    623

    Re: what``s the algo?

    Here's a hint - look at all the entries where the result (number on the right) changes from the previous line.
  22. Replies
    279
    Views
    28,173

    Re: New Forum Update

    Exactly this happened to me also, and it was my post :(
    I was starting to think the upgrade had become self-aware and was removing any posts containing suggestions to remove it. :D
  23. Replies
    279
    Views
    28,173

    Re: New Forum Update

    This has probably been said before, but why can't the 'upgrade' be rolled back? It has caused many problems, with there still (after 6 months!) being no end in sight.

    I know it would be...
  24. Replies
    68
    Views
    36,959

    Re: Fun C++ Problem

    The original code has a space character where the minus sign now is - so it is replacing the space.
  25. Thread: need help

    by Peter_B
    Replies
    2
    Views
    793

    Re: need help

    Whoever wrote the specifications for this was a bit sloppy. Simply returning 'true' for any input would fulfil this requirement :D
Results 1 to 25 of 613
Page 1 of 25 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center