C++ string via STL String

Description

C++ string via STL String

#include <iostream> 
#include <string> 
  
using namespace std; 
  
int main(int argc, char *argv [])
{ 
        cout << "Welcome to Text Adventure!" << endl << endl; 
        cout << "What is your name?" << endl << endl; 
        string playerName; /*from  ww  w . j  av  a2s.  c o m*/
        cin >> playerName; 
  
        cout << endl << "Hello " << playerName << endl; 
  
        return 0; 
}



PreviousNext

Related