C++ Standard Input read in char array

Description

C++ Standard Input read in char array

#include <iostream> 
  
using namespace std; 
  
int main(int argc, char *argv [])
{ 
        cout << "What is your name?" << endl << endl; 
  
        char playerName[1024]; 
        cin >> playerName; //from   w  w w. jav  a  2s  . c  o  m
  
        cout << endl << "Hello " << playerName << endl; 
  
        return 0; 
}



PreviousNext

Related