判断一个文件是否存在用什么函数啊?
我用fopen打开文件路径,if((fp=fopen(路径,r))==NULL),然后运行时提示有错误,应该怎么判断文件存在啊?谢谢帮助一下我 这个小虾 If an error occurs, OpenFile returns –1 and sets the last error status to one of the following values. To get the last error status, call GetFmtIOError.FmtIOMaxFilesErr 256 files open already.
FmtIOInvalArgErr Filename is NULL or contains only whitespace.
FmtIOInvalArgErr Invalid Read/Write Mode, Action, or File Type.
In addition, OpenFile sets the error status to a system–dependent value if an error occurs opening the file. For more information about these values, see the library help. 并不是NULL,而是负值 打开正确无错误就存在,并能能读取到数据 谢谢各位帮忙 还需要请教一下,用access函数总是出现错误,好像是定义类型错误,为什么啊?帮忙解答一下吧,谢谢
页:
[1]