"flush(cout)" flushes the output buffer!
The only way to "flush" standard input is:
cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');
Type: Posts; User: GReaper
"flush(cout)" flushes the output buffer!
The only way to "flush" standard input is:
cin.ignore(std::numeric_limits<std::streamsize>::max(), '\n');