How do I make the working directory the "debug directory" but not through the properties, but through the code?
chdir ("Debug");
That's what I use for Windows apps.
Obviously, the directory "Debug" would be inside the current working directory. To go up a level:
chdir("..");
Or to make a directory:
mkdir("Debug");
Incidentally, if you need to know where your working directory currently is, use something like:
char workingDir [_MAX_PATH]; _getcwd( workingDir, _MAX_PATH );
In your own code, there's no such thing as a "debug directory". That's a property of your debugger or IDE.
That's what I use for Windows apps.
Obviously, the directory "Debug" would be inside the current working directory. To go up a level:
Or to make a directory:
Incidentally, if you need to know where your working directory currently is, use something like: