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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!