I am writing this code to access a file in eclipse CDT
ifstream inFile; ofstream outFile; string next; inFile.open("input.txt"); if (inFile.fail()) { cout << "\nCould not open input.txt"; exit(1); }
The problem is that when I try to debug an application or run the application from within eclipse, it cannot find the input.txt file. When I launch my application from the console, it works fine and opens the file. I need to debug the application, but I can not, because for some reason eclipse ide cannot find the file.
Where should I put the file?
source share