Question: Getting error on build (fatal error: circle.h: No such file or directory) Please assit in fixing C++ code below. Also need comments for each line
Getting error on build (fatal error: circle.h: No such file or directory) Please assit in fixing C++ code below. Also need comments for each line of code.
#include "circle.h" #include "square.h" #include
int main() { char type; while(true) { cout << "Enter type of figure(C - Circle, S - Square or Q - quit: "; cin >> type; if(type == 'C') { Circle* c = new Circle; c->input(); c->print(); delete c; } else if(type == 'S') { Square* s = new Square; s->input(); s->print(); delete s; } else if(type == 'Q') exit(0); else cout << "Invalid ";
cout << endl; }
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
