标准块CP功能实现
2024-09-29 04:49:02
#include<stdio.h> int main(int argc,char *argv[])
{
FILE *src_fp,*des_fp;
int src_ret;
char buf[]={}; if(argc != )
{
printf("please input paramester\n");
return -;
} //打开源文件
src_fp = fopen(argv[],"r");
if(src_fp == NULL)
{
printf("open the file %s is failure\n",argv[]);
return -;
}
printf("open the file %s is success\n",argv[]); //打开目的文件
des_fp = fopen(argv[],"w");
if(des_fp == NULL)
{
printf("open the file %s is failure\n",argv[]);
return -;
}
printf("open the File %s is success\n",argv[]); //将源文件拷到目的文件中
while()
{
src_ret = fread(buf,,,src_fp);
if(src_ret == )
{
printf("the file is end\n");
break;
}
fwrite(buf,,src_ret,des_fp);
} //关闭文件流
fclose(src_fp);
fclose(des_fp);
return ;
}
最新文章
- 自定义框架(MyMvc)
- HDU 5860 Death Sequence(死亡序列)
- 2. Transcribing DNA into RNA
- Gridview 分多页时导出excel的解决方案
- Packet for query is too large(1767212 >; 1048576)mysql在存储图片时提示图片过大
- C语言实现泛型编程
- Effective C++ -----条款45:运用成员函数模板接受所有兼容类型
- sql-mode=";STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION";问题解决
- css3 画x图形
- mk文件剖析
- 找出数组前N大的数
- struct--------构造函数对结构体初始化的影响
- 设置outlook自动回复
- Android 游戏开发 View框架
- android 学习之RecyclerView
- [HNOI2004]树的计数
- 【BZOJ3233】【tyvj1729】文艺平衡树
- springmvc 开发流程图
- Confluence 6 用户目录图例 - 连接 Jira 和 Jira 连接 LDAP
- 32位系统和x86的关系?