View Single Post
Old 04-22-2005, 02:21 PM   #2 (permalink)
QUantumAnenome
Code Monkey
 
Join Date: Mar 2005
Posts: 55
QUantumAnenome is on a distinguished road
Send a message via Yahoo to QUantumAnenome
GetModuleFileName() will give you the exe you are currently running, and you can extract the directory from that.

If you have argv[0], that gives you the same thing.

If it's a windoze app, the equivalent of argv[] is available inside winmain() and you need to save it somewhere.

Also look at getcwd() - gets current working directory, chdir() - changes it, etc.
QUantumAnenome is offline   Reply With Quote