Tuesday, July 28, 2009

C++ Program help?

Whenever I create a new project and try to run it I get the message "Unable to start program C:\.........





The system cannot find the path specified"





I get message even though I have saved the program.





Whats wrong?

C++ Program help?
It sounds like the directory that you store your programs in has not been added to your PATH environment variable. Right click on "My Computer" and select "Properties" then click on "Advanced" . . . look for an entry in the lower pane called "PATH". Edit it and go the end of the line and add a semicolon followed by the path to where your compiled programs are stored. Click OK and try it gain.





If you are using Linux, add it to your .bash_profile or .bashrc file . . . you should see there where the PATH variables are being set. Use a colon instead of a semi there and add it to the end.





That should do it. Hope this helps.
Reply:Which


IDE you are using, please give complete error details
Reply:For Turbo C++ IDE I guess, you have not saved the project. Or perhaps there is a problem with your directories of INCLUDE files. Goto Options-%26gt;Directories to change that.


Also it may be that you have not added all the files to the project.


Also include the total error message here to get more help.


You had gone: "Unable to start program C:\........." What is the "..." ?
Reply:I would need more info to give you a truly good answer, but it sounds like the default project path directory in your IDE/compiler is set to the wrong path. You need to find out where the setting for the project directory path is, and make sure that the project you saved is saved to that directory. If not, you need to move it. Good luck.
Reply:It needs to be saved in your current path, as defined in environment. Alternatively type the whole path to the program.


No comments:

Post a Comment