|
|
|
|
 fopen()创建新文本文件的问题 - qiuyang957 [ 2005-08-29 15:45 | 553 byte(s)]
 Re: fopen()创建新文本文件的问题 - Atu [ 2005-08-30 14:25 | 113 byte(s)]
 Re: fopen()创建新文本文件的问题 - qiuyang957 [ 2005-08-30 15:29 | 29 byte(s)]
 Re: fopen()创建新文本文件的问题 - qiuyang957 [ 2005-08-29 18:04 | 135 byte(s)]
 Re: fopen()创建新文本文件的问题 - cjhsh [ 2005-08-29 17:59 | 22 byte(s)]
|
|
|
|
[Original]
[Print]
[Top]
|
#include<stdio.h>
main(void)
{
FILE*fp1;
char c;
fp1=fopen("text.txt","w");
while((c=getchar())!='
')
putc(c,fp1);
fclose(fp1);
}
我在linux的终端进行了如下操作:
1 gcc -o prog110 prog110.c
2 ./prog110
hello world!
3 cat text.txt
结果什么也没看到,一开始我的linux不是完全安装的,后来完全安装还是这样,同样的程序和操作过程在别人机子上却是可以的,请问是什么原因啊?
|
|
|
[Original]
[Print]
[Top]
|
|
|