1

i am using Visual studio 8. i pass command line argument to my program when i execute the program using exe file it works fine but when i use to debugg. it is unable to open the input file which i have given it in the form of command line argument. although i have given the command line argument in the Project->properties->debug->command line arguments....

e.g "program.exe" input_file output_file

input file contains data which i have to use in the calculation if i am unable to debug it. how can i remove the errors in my program

reply me thanks

2 Answers 2

1

You may need to specify the working directory on that same property page in order to have your debug executable run in the same directory as your input file. Right now it's probably not able to pass your file because it can't find it.

Sign up to request clarification or add additional context in comments.

2 Comments

i have placed the input file in the same directory as well as the set the working directory if it can not find the file while debugging it should not find it while normal execution may be i am wrong but still confusing
See Tobbe's response, you should not be putting the .exe name in the "Command Arguments" section if you are doing that.
1

You should not include "program.exe" in the command line arguments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.