jarro_2783
April 28th, 2007, 09:47 PM
If I start a program from a directory other than the executables actual folder how can I access the path that it's actually installed in?
eg.
c:\> c:\programming\myprogram\myprogram
CurrentDirectory will now give me c:\, and any calls to std::ifstream::open will be relative to c:\ and I won't be able to access dlls and other resource files that I might want to load which are in the same folder as my executable.
How do I do this?
eg.
c:\> c:\programming\myprogram\myprogram
CurrentDirectory will now give me c:\, and any calls to std::ifstream::open will be relative to c:\ and I won't be able to access dlls and other resource files that I might want to load which are in the same folder as my executable.
How do I do this?