If a string is defined like this
std::string name;
What will be the value of the uninitialized string \"name\" and what size it would be?>
value is null , and size is 0 But you can directly chk if the string is empty or not by empty()
Just in case you want to check that in your application , Do this
std::string name // Construct an empty string
if(name.empty()) { // Check if its empty
name="something";
}
Similar and more detailed discussion is here initializing strings as null vs. empty string