请问判断文件存在用那个函数,参数分别是什么?

楼上似乎理解错了,他问用什么函数判断文件是否存在:

FileExists(文件名)

很简单的一种办法:

#include <iostream>
#include <fstream>
using namespace std;
#define FILENAME "stat.dat"
int main()
{
    fstream _file;
    _file.open(FILENAME,ios::in);
    if(!_file)
    {
        cout < <FILENAME < <"没有被创建";
      }
      else
      {
          cout < <FILENAME < <"已经存在";
      }
      return 0;
}

extern PACKAGE bool __fastcall FileExists(const AnsiString FileName);