how to use the Arguments in the run configuration [message #784068] |
Thu, 26 January 2012 21:45  |
Eclipse User |
|
|
|
void getInputFile(char** argv[]) {
//Local Declaration
FILE* spIn;
printf("\nRetrieving Data");
spIn = fopen("argv[1]", "r");
if(!spIn){
printf("\nCould not open input file\a\n");
}
This is a function that I have written in eclipse (Indigo). In my project folder I have 3 sub-folders the source folder, release folder and debug folder. I have also created a text file and placed a copy of this text file in each sub-folder. This are the steps I took read the text file. Run Configuration -> my project release folder is selected -> Arguments under the Program arguments I typed in the name of the text file inputFile.txt. And I clicked on the run button. but the error message I programmed came up. It seems as though eclipse cannot find my inputFile.txt. How do I correct this problem. Thank you!
|
|
|
|
Powered by
FUDForum. Page generated in 0.07143 seconds