Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C++ (http://www.go4expert.com/forums/cpp/)
-   -   error with c++ code please help asap! (http://www.go4expert.com/forums/error-cpp-code-help-asap-t23601/)

cgould-engi6 18Oct2010 05:10

error with c++ code please help asap!
 
Im using eclipse c++ complier and i keep getting the error " cannot open output file assignment3.exe: permission denied " can anyone tell me why i might be having this problem please? it may be a problem with the code , here's the code

Code:


# include
<iostream>

using
namespace std;

void
description();

double
deceleration(double v1, double v2);

int
main(){
description();
cout <<
" initial speed in kph: " << endl;
double v1;
cin >> v1;
cout <<
" speed after one minute: " << endl;
double v2;
cin >> v2;
cout <<
" the deceleration rate is " << deceleration(v1, v2) << " m/s^2"<<endl;

}

void
description(){
cout <<
" This program plays Mark's crazy prairie" << endl

<<
" cycling game and extrapolates deceleration, " << endl

<<
" time and distance given 2 speeds 1 minute " << endl

<<
" apart. " << endl;
}

double
deceleration(double v1, double v2){
return ((v1 / 3.6)-(v2 / 3.6)) / 60;
}



jimblumberg 18Oct2010 06:10

Re: error with c++ code please help asap!
 
What operating system are you using?

Check your setup for the location of the output file.

Make sure you have permission to write to the output directory.

Also this link Eclipse how-to might help.

Jim

xpi0t0s 18Oct2010 15:31

Re: error with c++ code please help asap!
 
Is the program still running? You cannot overwrite an executing executable file.


All times are GMT +5.5. The time now is 15:49.