2011年5月6日

摘要: 本文用C语言进行一般的文件IO.1、以单个字符的形式写到文件。#include <stdio.h>int main(){FILE* pfile=NULL;char* ch;char str[100]="To be or not to be,that is a question.";pfile=fopen("outfile.txt","w"); //每次写入都先删除"outfile.txt"里面的内容。若要将新的内容添加到结尾可这样:\ pfile=fopen("outfile.txt" 阅读全文
posted @ 2011-05-06 10:28 jetliao 阅读(842) 评论(0) 推荐(0)

导航