problem appending

This is a discussion on problem appending within the C++ Programming forums, part of the General Programming Boards category; Originally Posted by Furious5k Nevermind, thank you C_ntua. But I now receive an error " no match for `string & ...

  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.

Page 4 of 4 FirstFirst 1234
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, 09:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 03:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 07:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 05:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21