cin and getline code example Example: cin.getline cin>>n; cin.ignore(); cin.getline(cin,string,'\n');