I have the following code:
#include #include using namespace std; string name; string age; int main() {
In C++ programming language use getline(cin, name); for string variable input.
getline(cin, name);
Where cin can be any istream and name is a string that you want to hold the value.
cin
istream
name