November 26th, 2012 10:29 AM
November 26th, 2012 09:48 AM
GCDEF, thanks for your reply.
I just found another option that seems to work:
if (*a == '\0')
Is this also a correct way?
November 26th, 2012 09:24 AM
I mean I don't actually assign anything to 'a' myself (just realised that the line
const char* const a = ... would probably not work and might just confuse everybody).
November 26th, 2012 09:19 AM
Hi,
I need to check if the pointer const char* const points to an empty string.
Something like this:
const char* const a = ...
if (&a == "") {
cout << "empty string!";