473,395 Members | 1,535 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,395 software developers and data experts.

how to make a menu program?

how to make a menu program where in you need to enter groceries, t-shirt brands and shoes brands and if you choose groceries,there must have items such as canned goods,household materials and if you choose canned goods the price must appear in the monitor and you will be able to know if that item is discounted or not
Aug 12 '10 #1

✓ answered by weaknessforcats

To create a menu program start with an infinite loop in main().

Then first thing inside the loop, get a menu choice form the user.

Test the choice and call the correct function for the choice. When that function returns you are still in the loop to get the next choice.

One of the choices would be to exit the program. Here you call your exot function. This function does any cleanup that may be necessary and then stops the program. It does not return.

2 2171
weaknessforcats
9,208 Expert Mod 8TB
To create a menu program start with an infinite loop in main().

Then first thing inside the loop, get a menu choice form the user.

Test the choice and call the correct function for the choice. When that function returns you are still in the loop to get the next choice.

One of the choices would be to exit the program. Here you call your exot function. This function does any cleanup that may be necessary and then stops the program. It does not return.
Aug 12 '10 #2
thanks for your help...
but again i dont know how to make a source code of my menu program...im too confused
Aug 14 '10 #3

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

Similar topics

3
by: JohnIsCrazy | last post by:
ok i'm interested in "scripting" if i'm wrong but i think is would be considered scripting i want to make a program that inside your browser will click on a certain place and i set that place and...
3
by: Abby | last post by:
I'm now using Cygwin as my compiler for C code. I use Dev-c++ as my editor. The reason why I chose Cygwin compiler instead of the compiler that came with Dev-C++ is that I believe it uses the same...
2
by: Ken Yu | last post by:
Hi, I want to make a program for receive E-mail by POP3, and forward to another E-mail Account, if the E-mail with Attachment , will delete the attachment before forward, where can i find more...
8
by: Daniel Kaseman | last post by:
Can someone help me make a program?
52
by: mavic | last post by:
hi to everybody,i need help for my project....how to make a program that accept any integer and convert it binary,octal and hexadecimal.pls help me...thanks
7
by: hankssong | last post by:
Hi everyone, I'm writing a program that can retrieve some specified info from a web page, such as python topics I interested on a bbs. Now I had written the python script (run in the background),...
1
by: nehal taha | last post by:
hi all; please i want to make a menu program using c language but i dont know how to make it as i am a beginner please i need your help as soon as possible...the menu will include new ...
0
by: Laszlo Nagy | last post by:
agus@cs.its.ac.id wrote: Can be done via the standard imaplib module. No need to use twisted. Save it as an eml file. Use the standard email.Parser module for extracting headers. I have no clue...
0
by: =?Utf-8?B?bGlnaHRkb2xs?= | last post by:
Dear EveryOne... i want to make some program like soaptool kit because of log. i used the soaptoolkit to see a soap messages, if i send lots data to IIS in my program by web service, i...
82
by: Bill David | last post by:
SUBJECT: How to make this program more efficient? In my program, a thread will check update from server periodically and generate a stl::map for other part of this program to read data from....
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.