Is there any variables in C++ like working_directory or program_directory?
Printable View
Is there any variables in C++ like working_directory or program_directory?
No. Do you need this under Windows or Linux? For Windows look for GetWorkingDirectory() and GetModuleFileName().
Well, actually I just want to make a string that contains the path where the executable is located.
The first command line argument passed to main is the path to the executable.