If it is run from the command line it will just output the filename like "program.exe".
However if the file is double clicked, then argv[0] will hold the current path aswell as the program name.
If it is run from the command line it will just output the filename like "program.exe".
However if the file is double clicked, then argv[0] will hold the current path aswell as the program name.
In this case it will hold the full path to the exe. But that need not be the current working directory.Originally Posted by John_
You have to call somthing like GetCurrentDirectory() to find out the current working directory.
Even if you call your exe from the commandline. You could call the exe from anywhere ( somwhere other then where the exe is located ) and your OS would locate the exe via the PATH environment variable.
Kurt
Ah, thank you very much!
Code:Error W8057 C:\\Life.cpp: Invalid number of arguments in function run(Brain *)