void Change()
{
char word[10000],a;
cout<<"请把需要转换的文件改名为<我.txt>并放到D盘的根目录下,按任意键后确定继续!"<<endl;
cin>>a;
fstream iofile("D:\\我.txt",ios::in|ios::binary);
if(!iofile)
{
cout<<"文件不存在!"<<endl;
exit(1);
}
iofile.read((char*)&word,sizeof(word));
for(int n=0;n<=10000;n++)
++word[n];
iofile.close();
ofstream ofile("D:\\我.txt",ios::out);
ofile<<word;
ofile.close();
cout<<"\n转换完毕!\n\n";
}
{
char word[10000],a;
cout<<"请把需要转换的文件改名为<我.txt>并放到D盘的根目录下,按任意键后确定继续!"<<endl;
cin>>a;
fstream iofile("D:\\我.txt",ios::in|ios::binary);
if(!iofile)
{
cout<<"文件不存在!"<<endl;
exit(1);
}
iofile.read((char*)&word,sizeof(word));
for(int n=0;n<=10000;n++)
++word[n];
iofile.close();
ofstream ofile("D:\\我.txt",ios::out);
ofile<<word;
ofile.close();
cout<<"\n转换完毕!\n\n";
}