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

📄 subject_27614.htm

📁 一些关于vc的问答
💻 HTM
字号:
<p>
序号:27614 发表者:冬瓜猫 发表日期:2003-01-13 23:07:28
<br>主题:VC中有没有判断某一个文件或目录是否存在的函数?
<br>内容:你VB中有FileExists等,VC中有没有?
<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>回复者:tjhe 回复日期:2003-01-13 23:15:07
<br>内容:_access(...)函数,即<BR>int _access( <BR>&nbsp;&nbsp; const char *path, <BR>&nbsp;&nbsp; int mode <BR>);<BR><BR>如:<BR>&nbsp;&nbsp; if( (_access( "ACCESS.C", 0 )) != -1 )<BR>&nbsp;&nbsp; {<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;printf( "File ACCESS.C exists\n" );<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/* Check for write permission */<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;if( (_access( "ACCESS.C", 2 )) != -1 )<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; printf( "File ACCESS.C has write permission\n" );<BR>&nbsp;&nbsp; }<BR><BR>另外可使用CFileFind类的FindFile成员函数及IsDirectory( )或<BR>CFile类的静态成员函数GetStatus(...)<BR><BR><BR>2003-1-13 23:23:09

⌨️ 快捷键说明

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