how to check for an empty string in c++ code example
Example: c++ check if string is empty
#include <iostream>
int main()
{
std::string str;
if(str.empty()) std::cout << "Empty";
return 0;
}
#include <iostream>
int main()
{
std::string str;
if(str.empty()) std::cout << "Empty";
return 0;
}