开发者

Working directory

开发者 https://www.devze.com 2023-02-10 04:38 出处:网络
How do I make 开发者_JAVA百科the working directory the \"debug directory\"but not through the properties, but through the code?chdir (\"Debug\");

How do I make 开发者_JAVA百科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.

0

精彩评论

暂无评论...
验证码 换一张
取 消