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

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

Apache NiFi ExecuteScript: Groovy script to replace Json values via a mapping file -