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

📄 menu.h

📁 通过类型姓名年龄类别来显示动物
💻 H
字号:



//***************************************
// Menu.h: interface for the Menu class.*
//***************************************

#if !defined(_MENU_DEF__)
#define _MENU_DEF__

#ifndef BORLANDC
#include <stdlib.h>
#include <string.h>
inline void   clrscr()                   // Clear screan function

{
	system ( "cls" );
}

#else
#include <conio.h>
#endif
#define MAX_MENU_NUMBER 20               // The max Menu number is 20

class Menu 
 
{

private:

	char mTitle[100];                    // Menu Title
	int mItemNumber;                     // Menu Items number
	char * mMenuItems[MAX_MENU_NUMBER];  // Pointrer to array

public:

	int MakeChoice();                    // Get the choice from user
	void Display();                      // Display the choice
	Menu();                              // Default constructor
	Menu( char * Title, char * CharItems[], int NoOfItems ); // Normal constructor
	~Menu();                             // Destructor
	void SetTitle ( char * Title )       // Set the Title for the Menu
	{ strcpy ( mTitle, Title ); }

};

    void EatKeys();                      // To clean the input stream

#endif 

//***********************************************************************

⌨️ 快捷键说明

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