Both of the following statements read and discard characters up to and including the end of a

Question:

Both of the following statements read and discard characters up to and including the end of a line. In what way does the behavior of one differ from that of the other?
while (cin.get() != '\n')
continue;
cin.ignore(80, '\n');

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

C++ Primer Plus

ISBN: 9780321776402

6th Edition

Authors: Stephen Prata

Question Posted: