guohui.cpp

来自「老师安排的一个c++小程序」· C++ 代码 · 共 49 行

CPP
49
字号
// guohui.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include "personnel.h"
#include <conio.h>
#include <iostream.h>
#include <fstream>
using namespace std;
CPersonnel staff;
int main(int argc, char* argv[])
{

	char userResponse;
	bool exitApp=0;
	while (exitApp==0)
	{
		system("cls");
		staff.DisplayAppInfo();
		userResponse=staff.GetLegalInput();
		if(userResponse=='Q'||userResponse=='q')
		{
			exitApp=1;
			cout<<"按下任意键程序将自动退出!"<<endl;
		}

		if(userResponse=='1')
		{
			staff.DataQuery();
		}

		if(userResponse=='2')
		{
			staff.DataInput();
		}

		if(userResponse=='3')
		{
			cout<<endl;
			cout<<"--------文件内容-----------"<<endl;
			staff.OpenfileDisplay("staff.bat");
		    _getch();
		}
		
	}

	return 0;
}

⌨️ 快捷键说明

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