cout<<"\n\t=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=";
cout<<"\n\t请 输 入 您 的 选 择:";
begin1:
cin>>cCmd;
c=cin.rdstate();
while(c)
{cin.clear();cin.getline(buf,80);
cout<<"\n\t非法输入 !重新输入:";
cin>>cCmd;
c=cin.rdstate();}
if(cCmd!=1&&cCmd!=2)
{cout<<"\n\t错误选择,重新选择:";goto begin1;}
if(cCmd==2)
{
cout<<"\n\t\t 操作完毕,数据已保存到"<<sFile;
cout<<"\n\t=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=";
cout<<"\n\t 请按任意键退出系统!";
cout<<"\n\t=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*="<<endl;
return;
}
if(cCmd==1)
{
char cchoice;
do
{
cout<<"\n\t默认路径是:D:\\文件\\rili.txt\n\t请输入存盘路径:";
cin>>sFile; cin.getline(buf,100);
cout<<"\t确认无误是"<<sFile<<"吗?是(Y)否(N):";
cin>>cchoice;
}while(cchoice!='y'&&cchoice!='Y');
cout<< "\t-----------------\n\t请输入公历年 ,月份(用空格格开):";
cin >>Year;cin>>Month;
SolarShow(Year,Month,sFile);
strat:
cout<<"\n\t===*=======*=======*=======*=======*=======*=======*===="; cout<<"\n\t (1)上一月 (3)上一年 (5)重新输入年月\n";
cout<<"\n\t (2)下一月 (4)下一年 (6)返回上级菜单";
cout<<"\n\t===*=======*=======*=======*=======*=======*=======*===="; cout<<"\n\t请 输 入 您 的 选 择:";
cin>>cCmd;
c=cin.rdstate();
while(c)
{cin.clear();cin.getline(buf,80);
cout<<"\n\t非法输入 !重新输入:";
cin>>cCmd;
c=cin.rdstate();}
switch(cCmd)
{
case 3: { Year=Year-1;SolarShow(Year,Month,sFile);goto strat;}
case 1: { Month=Month-1;SolarShow(Year,Month,sFile);goto strat;}
case 4: { Year=Year+1;SolarShow(Year,Month,sFile);goto strat;}
case 2: { Month=Month+1;SolarShow(Year,Month,sFile);goto strat;}
case 5: {cout << "\n\t请输入公历年 ,月份(用空格格开):";
cin >>Year;cin>>Month;So
首页 上一页 2 3 4 5 6 7 8 下一页 尾页 5/8/8
免费资料文档--万年历设计(五)由毕业论文网(www.huoyuandh.com)会员上传。