how to get a console input in C++ to a string code example Example: get data from terminal c++ int i; cout << "Please enter an integer value: "; cin >> i;