what exactly am i supposed to pass to cin.ignore if i need to use cin.getline after using a cin>> previously?
one methos i read about uses limits...does OJ support including limits?
getline after cin>>
Moderator: Board moderators
getline after cin>>
google
-
- Experienced poster
- Posts: 122
- Joined: Tue Apr 16, 2002 10:07 am
Re: getline after cin>>
nukeu666 wrote:what exactly am i supposed to pass to cin.ignore if i need to use cin.getline after using a cin>> previously?
one methos i read about uses limits...does OJ support including limits?
Code: Select all
Use cin.get() to swallow the carriage return.
Then use cin.getline(..)