📄 application.cpp
字号:
# include "Application.h"
void Application::Run()
{
bool run=1;
while(run)
{
ifstream in;
ofstream on;
ifstream in1;
ofstream on1;
string file_name;
cout<<"**********************************"<<endl;
cout<<"***My Winrar 1.0 beta System******"<<endl;
cout<<"***Produced by Sapphire Lee*******"<<endl;
cout<<"**********************************"<<endl;
cout<<"1.Compress the file"<<endl;
cout<<"2.Dempress the file"<<endl;
int choose;
cout<<"Please input the choice:"<<endl;
cin>>choose;
switch(choose)
{
case 1:
cout<<"Please Enter the name of the file:"<<endl;
cin>>file_name;
t.BuildMap(in,file_name);
t.Encode();
t.Compress(in,file_name,on,"Compress.txt");
cout<<"Compress success!"<<endl;
break;
case 2:
t.Depress(in1,"Compress.txt",on1,"Depress.txt");
cout<<"Depress success!"<<endl;
break;
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -