⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 subject_34126.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:34126 发表者:llisary 发表日期:2003-03-26 22:08:29
<br>主题:_getcwd怎么声明啊???
<br>内容:由于程序需要,要写上当前文件夹的路径。知道怎么用_getcwd来实现,可是程序说我没有声明,请问哈:要加一个什么头文件??<BR>多谢哈!!!
<br><a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p>
<hr size=1>
<blockquote><p>
<font color=red>答案被接受</font><br>回复者:dr0 回复日期:2003-03-26 22:41:24
<br>内容:/* This program places the name of the current directory in the <BR> * buffer array, then displays the name of the current directory <BR> * on the screen. Specifying a length of _MAX_PATH leaves room <BR> * for the longest legal path name.<BR> */<BR><BR>#include &lt;direct.h&gt;<BR>#include &lt;stdlib.h&gt;<BR>#include &lt;stdio.h&gt;<BR><BR>void main( void )<BR>{<BR>&nbsp;&nbsp; char buffer[_MAX_PATH];<BR><BR>&nbsp;&nbsp; /* Get the current working directory: */<BR>&nbsp;&nbsp; if( _getcwd( buffer, _MAX_PATH ) == NULL )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;perror( "_getcwd error" );<BR>&nbsp;&nbsp; else<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf( "%s\n", buffer );<BR>}<BR><BR>
<br>
<a href="javascript:history.go(-1)">返回上页</a><br><a href=http://www.copathway.com/cndevforum/>访问论坛</a></p></blockquote>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -