Question: C++ How to use while loop to read int the number after good and bad when the commands are the same show good show bad
C++ How to use while loop to read int the number after good and bad when the commands are the same show good show bad show good 1 show bad 1
while( !in.fail() )
{
if( command == "show")
{
string flag;
in >> flag;
in.ignore();
cout << "Command: " << command << " " << flag << endl;
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
