OK the prob is my book is tellin me to make a program that calculates the area of a circle with radius 4 and pie being 3.14159. Now I know how to to the calculation but I keep getin these errors sayin that I'm assigning values I never use but I do. Here see what I mean. I'll put the error messages after the code.
...and the error messages are:Code://Review Quesitons Pg 136 # 2 #include <iostream.h> int main() { int radius = 4; float pie = 3.14159; float C_Area; cout << "The area of a circle with radius of 4 is: " << endl; cout << C_Area = pie * (radius * radius) << endl; system ("Pause"); return 0; }
1. Overloaded 'endl' ambiguous in the context in function main()
2. 'pie' is assigned a value that is never used in function main()
3. 'radius' is assigned a value that is never used in function main()
So if anyone can first explain exactly what the errors mean and then tell me what my solution should be I would be greatful. I just don't understand why it's sayin i'm assigning values that are never used when I'm makin the variables and initializing them and then using them in my equation. Anyway thanks for any help I get.
-T