
please wait
|
|
cin.ignore(numeric_limits<streamsize>::max());
cin.ignore(numeric_limits<streamsize>::max(), '\n');
cout << "The result is: " + result << endl;
You are adding pointers here. You want to replace + with <<. << std::endl
is actually << '\n' << std::flush;
. So you are sending endline symbol and forcibly flushing stream buffer. Usually there is no reason to do that, so I just newline symbol where it needed.