c++ - Visual C++6 looking for text file in the "solution" directory rather than output directory -


i have vc++6 project , have following code snippet:

string s; int i=0, indx; ifstream myreadfile;  myreadfile.open("chanmap.txt"); 

for reason, when run program, looking text file in "solution"/root/dsw directory rather output directory (i.e. debug folder) legacy project, i'm sure settings mangled here , there. ide old me , foreign. appreciated.

for both debug , release projects, specify same path in project settings debugging -> working directory:

enter image description here other this, ensure run program windows explorer (or command propmpt same path). may need create shortcut, you'd specify directory.

since on windows, can use setcurrentdirectory within program.


Popular posts from this blog

php - How should I create my API for mobile applications (Needs Authentication) -

python 3.x - PyQt5 - Signal : pyqtSignal no method connect -

5 Reasons to Blog Anonymously (and 5 Reasons Not To)