Greetings.
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!
E.g.
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);Code:filename = "file.ext";
Thusly, I require something like this:
So, if anyone has an answear I'd be very, very thankful.Code:filename = get_startup_path() + "\\filename.ext";
Regards,
MisterT