I am working on a HW assignment and I have been stuck for a few days. I finally got it to compile but the values are all off and I cannot figure out where I am going wrong. I have reread the chapter and read all the tutorials. I am ripping my hair out here !!
Here is the prompt..
Write a program that reads the radius of a circle, as a double value, and computes and prints the diameter, circumference, and the area. The program should be able to compute this information for any number of radius values, until the radius value entered is < 0. The user should also be able to immediately exit the program if the first radius value entered is < 0. Use 3.14159 for the value of pi.
Your solution should contain a class called Circle, with methods GetDiameter, GetCircumference, and GetArea that compute the needed values. Your solution should separate interface from implementation, by having 3 files; Circle.h, Circle.cpp and Main.cpp.
The manifest constant M_PI is not standard C or C++; it is a Posix extension.
(AFAIK, on Posix, _USE_MATH_DEFINES is not required unless the implementation is quite old).