Sometimes being able to get the path that contains the currently running executable is handy. I've got my own function that does this which works on Windows, Linux and now OS X (with the help of my new Hackintosh).
Here it is:
::string g_appPath; const std::string& std
As an example, if you compiled this and ran it where the compiled executable was located at /home/gered/getapppathtest, then this function would return /home/gered/ for all platforms.
Maybe not the cleanest or best version, but it works well enough for me. Enjoy.