classic773
Programmer
It is very important for me to be able to use relative paths in my program. The line:
if(pref_file.Open("prefs.txt", CFile::modeRead | CFile::typeText)) Works fine when I'm debugging from within visual c++. However when I double click on the executable, it can't open the file because its trying to open "C:\Program Files\Common Files\System\Mapi\1033\NT\prefs.txt" (this was found from debugging info.) The location of the executable is in a completely different spot. I'm using win2000. Is there a way to set the relative path within the executable. Can somebody please help?
if(pref_file.Open("prefs.txt", CFile::modeRead | CFile::typeText)) Works fine when I'm debugging from within visual c++. However when I double click on the executable, it can't open the file because its trying to open "C:\Program Files\Common Files\System\Mapi\1033\NT\prefs.txt" (this was found from debugging info.) The location of the executable is in a completely different spot. I'm using win2000. Is there a way to set the relative path within the executable. Can somebody please help?