cout<<"Enter name"<<endl; //includes surname getline(cin, name); // assum name is std::string cin.getline(name, sizeof(name)); // assumes name is a character array