std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');

P

puzzlecracker

std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
I have seen it in faq - what does it do, exactly?
 
J

Jonathan Mcdougall

puzzlecracker said:
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
I have seen it in faq - what does it do, exactly?

What's the use of having all these books if you don't use them? I'll
give you an hint: The C++ Standard Library by Josuttis, page 609.


Jonathan
 
P

puzzlecracker

Jonathan said:
What's the use of having all these books if you don't use them? I'll
give you an hint: The C++ Standard Library by Josuttis, page 609.


Jonathan

good point, I already founded in api
 
M

Mike Wahler

puzzlecracker said:
std::cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
I have seen it in faq - what does it do, exactly?

Extract and discard from the stream all characters
up to and including '\n' or until end-of-stream,
whichever comes first.

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top