November 26th, 2012, 11:29 AM
November 26th, 2012, 10: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, 10: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, 10: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!";