[Error] id returned Exit Status
Feb 13, 2017 at 8:57pm UTC
My code was running smoothly then I changed (4/3) to (4.0/3.0) and now I'm getting an error message. Could someone explain what is causing the error message and also what "[Error] Id returned 1 Exit Status" means?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
#include <cmath>
#include <iostream>
using namespace std;
int main()
{
double v,r;
const double PI = 22.0/7.0;
cout<< "Radius in Meters " ;
cin>>r;
v = (4.0/3.0) * PI + (r*r*r);
cout<<"Volume in Cubic meters=" <<v;
system("PAUSE" );
return 0;
}
Last edited on Feb 13, 2017 at 11:05pm UTC
Feb 13, 2017 at 9:01pm UTC
Could someone explain what is causing the error message
What exactly is the error message?
what "[Error] id returned Exit Status" means?
It means that the linker failed to link your program into an executable, by the way that should be "ld" (lower case L).
Feb 13, 2017 at 9:02pm UTC
line 20: add '}'
then work
Last edited on Feb 13, 2017 at 9:02pm UTC
Feb 13, 2017 at 11:03pm UTC
I had that in the code allready sorry I just realized it wasn't included when I copy and pasted it.
Topic archived. No new replies allowed.