If using a char*, I can initialize it to NULL and later check if it is set by doing a comparison. How to do the same thing for a std::string
char*
NULL
std::string
You can't; at least not the same way you can test whether a pointer is NULL.
A std::string object is always initialized and always contains a string; its contents by default are an empty string ("").
""
You can test for emptiness (using s.size() == 0 or s.empty()).
s.size() == 0
s.empty()