📄 write.cpp
字号:
#include "stdio.h"
#include "fstream.h"
#include "conio.h"
#include "iostream.h"
#include "process.h"
void main()
{
FILE *fp;
char str;
printf("Please input some words:\n");
if((fp = fopen("2.txt","w")) == NULL)
{
printf("File cannot be created!\n");
exit(1);
}
while((str = fgetc(stdin)) !='#')
fputc(str,fp);
fclose(fp);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -