[C ++]创建一个可选择的菜单 [英] [C++] creating a selectable menu

查看:156
本文介绍了[C ++]创建一个可选择的菜单的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我程序中的当前菜单结构如下所示:

The current menu structure in my program looks like this:

void menu::main(){
	cout << "What do you want to do?" << endl;
	cout << "\t1 - Add an item"       << endl;
	cout << "\t2 - Add an entity"     << endl;
	cout << "\t3 - Add a recipe"      << endl;
	cout << "\t4 - Add a technology"  << endl;
	cout << "\t5 - Exit the program"  << endl;
	cout << "Your selection: ";
	int select; cin >> select; cout << select;
	return select;}



有没有办法创建一个类似于计算机上的BIOS菜单?



我尝试过:



我一直在寻找解决方案的互联网,但我无法弄清楚。


Is there a way to create a menu that functions like that of the BIOS menu on a computer?

What I have tried:

I have been scouring the interwebs for a solution, but I can't figure it out.

推荐答案

如果你想留在DOS-Box中,通常是标准的就像在这个示例代码中一样。



如果你想要一些更奇特的东西,你需要使用C等编程语言编写一些GUI。
If you wann stay in DOS-Box it is usual standard to do it like in this example code.

If you wanna some more fancy stuff than you need to program some GUI with programming language like C.


这篇关于[C ++]创建一个可选择的菜单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆