473,382 Members | 1,814 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,382 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 3116
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
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...

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.