application.cpp
来自「文件压缩与解压」· C++ 代码 · 共 38 行
CPP
38 行
# 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 + =
减小字号Ctrl + -
显示快捷键?