error traping strings

I am having problems with the input stream buffer. When u use the getline function and the user types in more charaters than the size you required. The next getline statment audtomically redas those values.I tried clear() and ignore () but those seem not to work. how do you clear the stream buffer so the values the user enterd can be enterd.
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories