Thread: problem appending

  1. #46
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Furious5k View Post
    Nevermind, thank you C_ntua.

    But I now receive an error " no match for `string & == int' "
    Perhaps because you are trying to compare a string with NULL? Which is not the right thing to do, I'd say. Perhaps comparing with "" is better?

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  2. #47
    Registered User
    Join Date
    Dec 2008
    Posts
    66
    Thank you.
    Last edited by Furious5k; 01-06-2009 at 08:39 AM.

  3. #48
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by Furious5k View Post
    Code:
    if (Loans[i].Book == 0)
    doesn't work either. I'm stumped as to how I can check if a string array has an empty location.
    Yes, that's EXACTLY the same as == 0, as NULL is a macro that expands to 0.

    See my previous post for a suggestion.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM