Google wouldn't find me an answear so I thought I'd ask you guys:)
Using c++, i need to get the path my console app runs from.
Now, I know a lot of you are thinking: just supply the filename relative to your executeable, and you're allright!
However, I wouldn't be, because if you launch the program from another dir than the one containing the executeable (e.g. toolbar, shortcut etc.), the working directory would be incorrect. (At least it does in windows);
filename = "file.ext";
Thusly, I require something like this:
So, if anyone has an answear I'd be very, very thankful.
filename = get_startup_path() + "\\filename.ext";
Since you've posted on the Windows board GetModuleFileName might be of interest.
Thanks a lot!
Sorry about posting in the Windows forum,
I'm kinda new here..