📄 cprintmessage.cpp
字号:
#include "CPrintMessage.h"
#include "goxy.h"
#include <iostream>
using namespace std;
void CPrintMessage::printMessage(int n)
{
/*CGoxy::Goxy(0,17);*/
cout<<endl;
switch(n)
{
case 9:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,input can not be empty!!";
break;
case 8:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,sex only can be 'M'or'm'or'F'or'f',please reput!!";
break;;
case 7:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"the data you input is not date type, please check and input with date type!!";
break;
case 6:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"the data you input is wrong double type, please check and input with double type!!";
break;
case 5:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!,the data you input is not int type,please check and input with int type";
break;
case 4:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!,the money you intput is out of range,you should chose [-50.00,100]!";
break;
case 3:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!,the date you input is out of range,you should chose[1900 ,2010]!";
break;
case 2:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!the number you input should in the range of records,please reput!!";
break;
case 1:
break;
case 0:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry! wrong choice! you should select a right number from menu!";
break;
case -1:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! name is only strcuct by letters and space,please reput!!";
break;
case -2:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! your input is out of range ,the length of name is 10 ,please reput !!";
break;
case -3:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! phone number should be 11 or 12 bits please check and reput!!";
break;
case -4:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! the length of money is 6 ,please dont out of range!!";
break;
case -5:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! date type's length is 10, please check and reput!!";
break;
case -6:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! sex type's length is 1, please check and reput!!";
break;
case -7:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! there is no record by the id you input, please check and reput!!";
break;
case -8:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!! the explain can not over 200 bits, please check and reput!!";
break;
case -9:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,the money you intput is out of range,you should input (0.00,999.99)!!";
break;
case -10:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,consum id is only be numbers and '/',please check and reput!!";
break;
case -11:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,id should be exist record id,total consum id should equal consum members!!";
break;
case -12:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,id should be exist record id,please check and reput!!";
break;
case -13:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,the date you input must later than the date you input before!!";
break;
case -15:
cout<<endl<<"ERROR INFO:"<<endl;
cout<<"sorry!!,the path you input is wrong please check and reput!!";
break;
default:
break;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -