#include<stdio.h> #include<string.h> #include<stdlib.h> //typedef unsigned int size_t; int main() { FILE *p = fopen("./a.txt","r"); FILE *p1 = fopen("./b.txt","w"); char buf[10] = {0}; while(!feof(p)) { memset(buf,0,sizeof(buf)); size_t res = fread(buf,sizeof(char),sizeof(buf),p); fwrite(buf,sizeof(char),res,p1); } fclose(p); fclose(p1); return 0; }
文件操作(二进制拷贝)
猜你喜欢
转载自www.cnblogs.com/wanghao-boke/p/11222805.html
今日推荐
周排行