How would it matter if my C++ code (as shown below) has a string initialized as an empty string :
std::string myStr = \"\"; ....some code to optionally popul
Empty-ness and "NULL-ness" are two different concepts. As others mentioned the former can be achieved via std::string::empty(), the latter can be achieved with boost::optional, e.g.:
std::string::empty()
boost::optional
boost::optional myStr; if (myStr) { // myStr != NULL // ... }