I have tried everything I know, (which isn't much at all), and I cannot seem to get this program to run properly. I am down to one error, (I think), and cannot seem to get passed it.
error: no match for 'operator<<' (operand types are 'std::basic_ostream<char>' and '<unresolved overloaded function type>')
It fails on line 44 of the main.cpp
cout<< "Area of the square is "<square.getArea;
Thank you for the reply, once I add the () I get the following:
undefined reference to 'Square::Square(int)'
undefined reference to 'Circle::Circle(int)'
undefined reference to 'Circle::setRadiuse(int)'
undefined reference to 'Circle::getArea() const'
undefined reference to 'Square::setLength(int)'
undefined reference to 'Square::getArea() const'
ok, after removing a few lines, it actually built but is not displaying any results. I have adjusted the main code to reflect what I have changed. I am almost there, I think.....
i see radius * Radius (what is Radius? why do you have 2 versions of it?)
it looks to me for example that if they pick circle, you read the local to main radius, then call the computation function which uses circle's radius, which is defaulted to zero and NOT THE SAME AS WHAT IS IN MAIN. You need to SET the class member radius to what was entered.
As a side not I strongly advise you to never have extremely similar or identical variable names. It just causes problems. Even if you have to type "mainsradius" in main.