"function does not take 0 arguments"

I'm just trying to get through this class, but I'm starting to struggle with basic things. This is the only error I have showing on my "radius = getRadius();" line. I see tons of examples where this works, but for me it doesn't. Please help.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
  #include <iostream>
using namespace std;

double getRadius(double radius);
double findArea(double area);
double findCircumference(double circumference);

int main()
{
	double radius;
	double area;
	double circumference;

	radius = getRadius();
	area = findArea((radius));
	circumference = findCircumference(radius);



	cout << "A circle with radius " << radius << "has an area of " << area << endl;
	cout << "and a circumference of " << circumference << endl;

	system("pause");
	return 0;
}


	double getRadius()
	{
		double radius;

		cout << "Enter the radius of the circle";
		cin >> radius;
		return radius;
	}

	double findArea()
	{
		double area = (3.14159*getRadius()*getRadius());
		return area;
	}

	double findCircumference()
	{
		double circumference = (2*3.14159*getRadius());
		return circumference;
	}
 
double getRadius(double radius);

and
 
double getRadius()

don't match.
I removed the "double radius" and added "double" to my other functions and now it kinda works. I get prompted to enter the radius 4 times, which I assume is because I have the "getRadius()" function in my other functions. How would I strictly get the inputted radius value into those functions with another prompt?
1
2
double findArea(double area);
double findCircumference(double circumference);

1
2
double findArea()
double findCircumference()

don't match.

How would I strictly get the inputted radius value into those functions with another prompt?

Simply, ask for the radius in main() and pass that as an argument for your other functions.
Topic archived. No new replies allowed.