This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Probelm checking for NULL

I am trying to check for a NULL character but I get the following error when I try to comiple:

 Error C193: '!=': bad operand type 

Any suggestion on how to correct the problem?

Thanks.

Parents
  • check for a NULL character

    You have a problem already in your idea of what it is you're trying to do, then. There is no such thing as a "NULL character". NULL is a pointer, not a character.

    You may be referring to the ASCII character number zero, sometimes referred to as NUL (only one 'L'!), which C programmers express as either an integer literal 0, or the character literal '\0'.

Reply
  • check for a NULL character

    You have a problem already in your idea of what it is you're trying to do, then. There is no such thing as a "NULL character". NULL is a pointer, not a character.

    You may be referring to the ASCII character number zero, sometimes referred to as NUL (only one 'L'!), which C programmers express as either an integer literal 0, or the character literal '\0'.

Children