I'm pretty sure you made the mistake. The character '0', the one you see when you print 0, is nothing like the others. So complaining about NULL was pointless of you, even if you were right that '0' is not '\0'. You just didn't say it.
I'm pretty sure you made the mistake. The character '0', the one you see when you print 0, is nothing like the others. So complaining about NULL was pointless of you, even if you were right that '0' is not '\0'. You just didn't say it.
It is not a special escape sequence like \t. It is just an integer constant 0. However, I am not sure if it is internally interpreted as octal or decimal, but the result is the same anyway. AFAIK '\0' is char L'\0' is wchar_t and 0 is int.
EDIT: I was thinking that you can use decimals also like \255 but I just realized you cannot. So it is octal's 0...
Last edited by kmdv; 06-17-2011 at 06:17 AM.