C语言写文件操作(一)
来源:互联网 发布:淘宝找同款原理 编辑:程序博客网 时间:2024/05/17 03:00
#include "stdio.h"
int main(int argc,char *argv[])
{
FILE *fp;
char ch;
fp=fopen("one.txt","wt+");
if(fp==NULL)
{
printf("can not this file");
getch();
exit(1);
}
printf("please input a string:\n");
ch=getchar();
while(ch!='\n')
{
fputc(ch,fp);
ch=getchar();
}
fclose(fp);
return 0;
}
int main(int argc,char *argv[])
{
FILE *fp;
char ch;
fp=fopen("one.txt","wt+");
if(fp==NULL)
{
printf("can not this file");
getch();
exit(1);
}
printf("please input a string:\n");
ch=getchar();
while(ch!='\n')
{
fputc(ch,fp);
ch=getchar();
}
fclose(fp);
return 0;
}
- C语言写文件操作(一)
- C语言 写文件操作
- C语言文件操作一
- C语言之文件写操作
- 总结文件操作函数(一)-C语言
- C语言的文件的操作(一)
- 浅谈C语言中的文件操作(一)
- C语言文件操作解析(一)
- C语言文件操作解析(一)
- C语言文件操作解析(一)
- C语言文件操作解析(一)
- C语言文件操作解析(一)
- C语言文件操作解析(一)
- C语言文件操作的相关(一)
- 文件操作一:基于C语言的文件操作
- C语言写文件
- 文件操作(C语言)
- c语言写的*.dbf文件的操作函数库
- u-boot源码----lowlevel_init.S分析
- C#之用默认浏览器打开指定网页...
- jquery克隆
- 20120326工作日记——hexdump与xxd
- Ubuntu+Eclipse+SVN 版本控制配置笔记
- C语言写文件操作(一)
- HDU 3371 Connect the Cities
- 函数重构
- delphi idhttp访问https需要增加IdSSLIOHandlerSocketOpenSSL1
- 第六周实验报告(任务2)
- A workgroup installation computer does not support the operation
- Qt下的mapx开发
- Cannot determine whether a queue with the specified format name exists.
- 测试框架之GTest