[Solved] c++ when using functions function call missing argument [closed]


It are functions, you have to call them as such. Note the brackets ()

cout << "Printing circle " << this->getXYr() << endl;
cout << "Circle Area: " << this->circArea() << endl;
cout << "Circle Perimeter: " << this->circPeri() << endl;

this-> is not explicitly needed.

Your second error is due this->getXYr() does not return a value. It returns void. There is no basic_ostream overload for it.

You either should put the logic of the getXYr() into the printCircle() function. Or call that function without calling cout on it:

cout << "Printing circle ";
this->getXYr();
cout << "Circle Area: " << this->circArea() << endl;
cout << "Circle Perimeter: " << this->circPeri() << endl;

3

solved c++ when using functions function call missing argument [closed]