📄 test.cpp
字号:
#include<iostream>
#include<fstream>
#include<string>
using namespace std;
/*
struct word
{
string name;
word *next;
};
word *w=NULL;
word *add(word *w,string a)
{
word *p=w;
w=new word;
word *s=new word;
s->name=a;
s->next=NULL;
if(p==NULL)
{
w=s;
}
return(w);
}
void print(word *w)
{
word *p;
p=w;
if(p==NULL){cout<<"no link."<<endl;return;}
while(p)
{
cout<<p->name<<endl;
p=p->next;
}
}
*/
void main()
{
fstream infile;
fstream outfile;
infile.open("a.txt",ios::in);
outfile.open("b.txt",ios::out);
char x;
infile.get(x);
while(!infile.eof())
{
outfile.put(x);
infile.get(x);
}
/*
string a="123";
w=add(w,a);
print(w);
*/
/* string x;
fstream file;
file.open("a.txt",ios::in);
file>>x;
cout<<x;
*/
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -