I am working on making a program for making lists but having trouble adding anything that is more than one word. (i.e. pop rocks, or toilet paper)
cout<<"What would you like to add?"<<endl;
string NewItem;
cin>>NewItem;
Right now I'm using cin but I saw something about getline() though nothing about if it would help me. When I tried it all I got was a runtime error so I'm not really sure what went wrong.
getline(cin, NewItem);
That is what I replaced the cin with when I tried it. Run time error didn't look for user input it just paused for a second.