c++clinuxunixpath

How do I find the location of the executable in C?


Is there a way in C/C++ to find the location (full path) of the current executed program?

(The problem with argv[0] is that it does not give the full path.)


Solution

  • To summarize: