The default constructor initializes the string to the empty string. This is the more economic way of saying the same thing.
However, the comparison to NULL
stinks. That is an older syntax still in common use that means something else; a null pointer. It means that there is no string around.
If you want to check whether a string (that does exist) is empty, use the empty
method instead:
if (myStr.empty()) ...