error with c++ code please help asap!

cgould-engi6's Avatar, Join Date: Oct 2010
Newbie Member
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; }
0
jimblumberg's Avatar
Ambitious contributor
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

Last edited by jimblumberg; 18Oct2010 at 06:14..
cgould-engi6, shabbir likes this
0
xpi0t0s's Avatar, Join Date: Aug 2004
Mentor
Is the program still running? You cannot overwrite an executing executable file.