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

java - Cannot send AES encrypted messages of over 47 characters -

php - How to set default value of a select dynamically from database using smarty? -

telerik - Reformat image format in PDF -