C++ Standard Input Read String from console window
#include <iostream> #include <string> using namespace std; int main(int argc, char *argv []) { cout << "What is your name?" << endl; string name {}; //from w w w. j av a 2 s . co m cin >> name; cout << "You said your name is: " << name << endl; return 0; }