So I am currently learning how to code using C++. I am trying to get the following code to execute. The purpose of the code is to, when executed, allow the user to enter in the radius of a circle which the application will then automatically output the entered radius attached with the circumference and the area.
Below is the code:
using namespace std;
cout << "Please enter the radius of the circle: ";
cin >> radius;
cout << endl;
circumference = 2 * 3.1416 * radius;
area = 3.1416 * radius * radius;
cout << "Radius = " << radius << endl;
cout << "Area = " << area << endl;
cout << "circumference = " << circumference << endl;
Whenever I executed the the program though, I get one error that reads 'fatal error LNK1169: one or more multiply defined symbols found'
If you think you could help solve this error and teach me how to avoid this error in the future, I'd greatly appreciate your help!
Thanks and have a nice day :)
You have not shown us your real code (as shown by the missing semicolon after
using namespace std, which would have caused a compilation error), and/or your IDE is misconfigured to link some module in twice or more.