Hello.Is there any function to get the exact path where the executable is even if the executable path changes.I mean that i run the executable in a different path everytime.Thanks in advance.
Don't use the "system()" function.
Do it the way Zaita showed you.
Possibly you could pipe the output of something like "ls" with a childprocess and execvp or something, but Zaitas way is already there and probably better.