Actually there is a setting in the VS IDE called something like working directory. When the program is run from the IDE then the current working directory is set to that path before execution. This...