Use string member-function empty - C++ STL

C++ examples for STL:string

Description

Use string member-function empty

Demo Code

#include <iostream> 
#include <string> 
using namespace std;

int main()/*from w  ww .  j a v  a  2 s.c o m*/
{
  string s3;

  cout << "\n\nTesting s3.empty():" << endl;

  if (s3.empty())
  {
    cout << "s3 is empty; " << endl;

  }
}

Result


Related Tutorials