开发者

Working directory

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜