Answered step by step
Verified Expert Solution
Question
1 Approved Answer
#include #include #include #include rectangles.h using namespace std; cout < < > < < flush; cin >> input; while (input != quit) { if
#include
#include
#include
#include rectangles.h
using namespace std;
cout << "> " << flush;
cin >> input;
while (input != "quit")
{
if (input == "dump")
{
tang.dump();
}
else
if (input =="insert")
{
cout<<"Please enter Name"<
cin>>name;
cout<<"Please enter left"<
cin>>left;
cout<<"Please enter botitom"<
cin>>bottom;
cout<<"Please enter right"<
cin>>right;
cout<<"Please enter top"<
cin>>top;
cout<<"Please enter color"<
cin>>color;
tang.insert(name, left, bottom, right, top, color);
}
else
if(input =="remove")
{
tang.remove(name);
}
else
if(input =="find")
{
tang.find(name);
}
}
}
When I want to insert something into the loop, it doe not end. And when I put more than 4 characters. the loops becomes an endless loop. Is there anything to prevent this from happening?
* rectangle.h is working as well as my other files
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started