473,396 Members | 2,038 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to make a menu in C++

I want to make a menu in my program using C++ language.
I use Bloodshed Dev C++ compiler

for example:
(1) Add data (2) Remove data (3) Exit

I want to make this menu to go through the options just pressing numbers
1,2 and 3.
May 17 '10 #1
5 3117
whodgson
542 512MB
One way is to use switch() with case statements corresponding to your menu items
May 17 '10 #2
weaknessforcats
9,208 Expert Mod 8TB
Almost every C/C++ textbook has the code for this as an example somewhere in the book.
May 17 '10 #3
I would use a switch statement with 0 for exit while choice not = 0.

with case 1,2,3 etc
May 21 '10 #4
@ronjr22
Could you give me the actual code please?
Would I use classes & functions?
How would I remove and add data?
May 26 '10 #5
something with a switch statement

Cout << Menu Options

int menu
Switch (Menu)

case 1:

Cin << Etc;

something like this
May 26 '10 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Gernot Frisch | last post by:
Hi, I have found some menu functions. It works quite well, but how can I replace it with a simple <a href> if javascript is turned off? I reduced my code to:...
3
by: Heather | last post by:
I notice the Tag property for menu items. Is there a way to assign say a 1 to the Tag property of certain menu items and then make those menu items not visible programatically? Thanks! Heather
3
by: dapernia | last post by:
Hi friends, I want to make menu in my C program For example: Main Menu: (1) Enter Data, (2) Control Variables (3) Exit I want to make this menu to go through the options just pressing...
0
by: keith | last post by:
I have win app that uses menu and toolbar. I set that toolbar property Wrappable=false. But I couldn't find the property for menu. So when resizing a form, menu items could be wrapped to...
3
by: Reb | last post by:
Hi, I am using drop down menu in my pages. In one of my page,there is a listbox control below the menu. This listbox control is hiding the drop down menu items. How can i make the drop down...
3
by: Fred W. | last post by:
(using VS2005) I want to hide a menu item, but setting the Visible property to False does not work! If it's initialy false and I set it to true, that works. Any suggestions? - Fred
2
by: Matt | last post by:
Is there a way to make menu controls behaviours like browser menu like. (file,Edit,View etc) or any other software menu dropdown.. I could do that with inbuild (<items<asp:menu:itemand make the...
2
by: =?Utf-8?B?SmFu?= | last post by:
Hi, I would like to have a View menu like the one in VS(2005), where I can have "two-key" shortcuts (e.g. Ctrl+W followed by E or Ctrl+E). Any suggestions how to do that? Thanks, Jan
1
by: =?Utf-8?B?anAybXNmdA==?= | last post by:
I've got one Context Menu named mi_EasterEggs with three (3) menu items: * mi_FontArial * mi_FontCourier * mi_RawData All menu items have their Visible properties set to False when the form...
0
by: gank456 | last post by:
how to make a new context menu to appear when a tree node is clicked? i've included onmouseclick event handler..but it doesn't work.. where should the handler be placed? is there any way to do...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.