how to check if a variable is empty 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;
}