So I am just starting Object oriented programming and I am still a bit shakey on a few things. The biggest is ths error: "request for member ‘setRadius’ in ‘checker’, which is of non-class type ‘Circle()’" I haven't the faintest clue how to fix this and it occurs for checker.getRadius and checker.area as well. What am I doing wrong?
Main.cpp
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <iostream>
#include <string>
#include "Circle.h"
usingnamespace std;
int main ()
{
double rad = 0;
cout << "Welcome!\n";
cout << "Please enter a radius for your circle: ";
cin >> rad;
Circle checker();
checker.setRadius(rad);
cout << endl << "Radius: " << checker.getRadius() << endl;
cout << "Area: " << checker.area() << endl;
return(0);
}