Path
-
In Windows, it is
GetCurrentDirectory
.«_Superman_»
I love work. It gives me something to do between weekends. -
AFAIK, the C++ language itself doesn't provide such functionality. And neither does any of the C runtime libraries (someone correct me if I am wrong). You have to use the underlying OS's (or any runtime environment's) APIs to achieve that. For Windows, Superman's reply holds.
...byte till it megahertz...
-
AFAIK, the C++ language itself doesn't provide such functionality. And neither does any of the C runtime libraries (someone correct me if I am wrong). You have to use the underlying OS's (or any runtime environment's) APIs to achieve that. For Windows, Superman's reply holds.
...byte till it megahertz...
-
What about getcwd() / _getcwd()? Declared in direct.h or unistd.h for Unix But for question the OP: GetModuleFileName() returns the fully qualified path of the application.
Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson
-
If you are targeting different platforms, I heartily recommend to use
boost::filesystem
which abstracts this functionality in a very comfortable manner. If only one platform is targeted and this platform is windows, use designated Microsoft frameworks instead of this low level APIs.