Answer the question
In order to leave comments, you need to log in
How to find out the path to an executable file on C++ Mac OS?
It is necessary that the program finds the path to the executable file, checks for files in its location folder.
Answer the question
In order to leave comments, you need to log in
The question is not entirely clear. You give an example of what you want to do and what result to get.
Because for posix file systems, the location of the file and its presence is not necessary for an already open file, since the handler points to an inode and not a directory entry.
Well, the simplest and most cross-platform is to take the first parameter main - the path to the executable program.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question