c/c++获取文件大小的方法

#include 
#include 
#include 
#include using namespace std;void main()
{    char *filepath = "C:\\1.txt";    //方法一    
    HANDLE handle = CreateFile(filepath, FILE_READ_EA, FILE_SHARE_READ, 0, OPEN_EXISTING, 0, 0);    if (handle != INVALID_HANDLE_VALUE)
    {        int size = GetFileSize(handle, NULL);
        cout<            
            
                            
当前标题:c/c++获取文件大小的方法
分享链接:http://myzitong.com/article/ihiigc.html