If string empty : string empty « string « C++ Tutorial






#include <iostream>
#include <string>

using namespace std;

int main()
{
    string word1 = "Game";
    string word2("Over");
    string word3(3, '!');

    string phrase = word1 + " " + word2 + word3;

    if (phrase.empty())
        cout << "\nThe phrase is no more.\n";

 return 0;
}








15.11.string empty
15.11.1.If string empty
15.11.2.string member function empty