ok i want the user to enter a name and have the program save it to a array
but were i have ' ' i had to put that to get it to do anything... when i didnt have it no matter what i pressed it didnt move any farther in the program it just stuck at entering input... after i put the ' ' i have to put a space at the end of the name for it to work... so i though why dont i put '\n' there so when they press enter it would keep going but that didnt work either.... and it doesnt work when i dont have anything there either...Code:void NewGame() { system("clear"); cout<<"what would you like to have your name as?"<<endl; cin.getline(Name,10,' '); cout<<Name; game(); }
thx for any help



LinkBack URL
About LinkBacks




