64,282
社区成员
发帖
与我相关
我的任务
分享
char *name = "C:\\Users\\administrator\\Desktop\\temp";
FILE *f = NULL;
try
{
f = fopen(name,"r");
if (f==NULL)
{
cout<<"not file"<<endl;
}
else
{
cout<<"is file"<<endl;
fclose(f);
}
}
catch (CException* e)
{
cout<<"exception"<<endl;
}