⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cexitframe.cpp

📁 AA制消费管理系统 要深入学习C++面向对象编程的同学可以看看。
💻 CPP
字号:
#include "CExitFrame.h"
#include "interface.h"
#include "check_char.h"
#include "CPrintMessage.h "
#include "conio.h"
#include "data_cmp.h"


#include <iostream>
#include <string>

using namespace std;




void CExitFrame:: printExitFrame()
{
	system("cls");
	string str[3]={"are you sure to exit?","1.yes,exit system now","0.no,return"};
	int num;
	printTitle("Exit System");
	printOption(str,3);
	while( !(num=inputctrl(1)));
	switch(num)
	{
	case 2:
		exit(0);
	case 1:
		break;
	default:
		break;
		
	}



}
/////////////////////////////////////////////////////
int CExitFrame::inputctrl(int n)
{



	cout<<"                          please make a choice 0-"<<n<<":";
	char ch_input = getche();
	

	if(!(C_check_char::checkChar(ch_input)==1))
	{
		CPrintMessage::printMessage(C_check_char::checkChar(ch_input));
		system("pause");
		return 0;
		
		
	}
	else
	{
		if(!(C_check_cmp::check_char(ch_input,n)==1))
		{
			CPrintMessage::printMessage(C_check_cmp::check_char(ch_input,n));
			system("pause");
			return 0;
			

		}
		else
		{
			if(ch_input=='0')
			{
				return 1;
			}
			if(ch_input=='1')
			{
				return 2;
			}

	


		}
	}

return -1;

}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -