|
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.
|