028-86922220
建站资讯

网站建设资讯

为你提供网站建设行业资讯、网站优化知识、主机域名邮箱、网站开发常见问题等。

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://whjierui.cn/article/ihiigc.html

其他资讯