135-1821-9792

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://kswsj.com/article/ihiigc.html

其他资讯



Copyright © 2009-2022 www.kswsj.com 成都快上网科技有限公司 版权所有 蜀ICP备19037934号