C如何得到文件的大小
摘要:
先用fopen打开文件,然后把文件指针指向文件尾. 再用ftell获得文件指针当前位置(即文件长度).源代码:#include "stdafx.h"#include #include using namespace std;int main(){FILE* fp = NULL;int nFileLen = 0;fp = fopen("c:/Test.txt", "rb");if (fp ... 阅读全文
posted @ 2009-02-11 13:13
DP.
阅读(912)
评论(0)
推荐(0)