What is the function of "cin.get()" and "cin.ignore()".

Recommended Answers

All 2 Replies

Why not look them up?
istream::get
istream::ignore

Basically, they're both input statements, but get() lets you keep the characters extracted from the stream and ignore() doesn't.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.