C/C++ :: Creating A Menu That Will Return The Menu After A Selection

Apr 7, 2014

This is what I have so far, it gives me a nice menu to select from and it all works but after I make a selection it closes the program. I tried to return to it but it won't work for me

#include <stdio.h>
int main() {
int choice;
int deposit;
int balance = 500; {
printf(" CHOOSE FROM THE FOLLOWING

[code]....

View 14 Replies


ADVERTISEMENT

C :: Selection Menu With Enter Key Support

Apr 27, 2013

I am working on a database project, which can store (initially) 10,000 marksheets with following capabilities

1) new entry
2) edit/modification of entry
3)delete entry
4) separate Departements ( BBA, BCS, M.Phil, Phd., etc.)
5) can store data on files ( initially, all data is stored in a single file)

Now, I want to create a menu, in which i can use arrow keys to navigate through the menu and use Enter key fo selection.

What should i use in it?? The project is only on C language.

View 4 Replies View Related

C :: How To Create Menu Selection With Arrow Key

Jun 22, 2014

I'm looking for an example of menu selection with arrow key i'dont know how to create one o think i should use CODE ASCI but what method I should follow

View 1 Replies View Related

C/C++ :: Menu Selection Does Not Continue To Desired Screen

Mar 8, 2014

Basically we have to create a system for loan amortization for vehicle company. The code is still in its development stage and I am having problems with one of the menu selections. all the other menu selections work fine except for menu selection 3. I'm quite stuck on it. When I run the program everything goes well except when I enter 3 at the main menu, it just exits the program instead of going to the screen for the menu selection.

#include<stdio.h>
#include<conio.h>
#include<string.h>
main() {
char un, /*username*/
name, /*customer name*/

[Code] ....

View 1 Replies View Related

C++ :: Menu Program Broken Down Into Series Of Calls To Function For Each Of Menu Items

Aug 19, 2013

I am trying to write a menu program that will be broken down into a series of calls to function for each of the menu items. Two of the menu items will be simple programs which I wrote.

I want two of the functions to run one of the two programs I am trying to include as items in the menu.

So far I am only familiar with variables, loops, if statements, and I just learned how to write functions.

The problem I am have is that I don't quite understand how to write a function that will run one of the two programs. Also I am having a hard time writing the program in away that would allow the user to select the menu items.

View 2 Replies View Related

C :: Program Based On Menu System - Option To Go Back To A Previous Menu

Apr 7, 2014

I'm creating a program that is based on a menu system. Basically each menu is its own user-defined function. The problem is at each menu you can input 'b' to go to the previous menu. I just have it call the function of that menu.

However, do the functions need to complete themselves eventually? If I just keep calling functions will I just keep going further and further deeper into ever running functions?

If so how do I avoid this and yet keep the option to go back to a previous menu/function?

View 2 Replies View Related

C :: How To Loop A Menu Without Multiple Return Value

Oct 18, 2014

I need a few pointers on how to replace the multiple "return input" in my "choice" function with a statement that perform the same action in C Programming..

Code:
/*
*FILENAME:
*PROJECT:
*PROGRAMMER: Brian Hinds
*DATE: September 05, 2014
*DESCRIPTION: This program uses a function to calculate the result of raising one number to the power of another.

[Code] ....

View 1 Replies View Related

C++ :: Creating Menu Program Using Only If And While For En Do Loops

Mar 13, 2014

I just started learning the basics of programming. While encountering one of the practice problems in the book by Alex Allain I got a little confused. The question is as follows:

Write a menu program that lets the user select from a list of options, and if the input is not one of the options, reprint the list.

The author assumes you can answer this question only using if statements and/or loops (while, for and do).

This is the code I've written thus far:

Code: #include <iostream>
using namespace std;
int main()
{
int option;
char reset;

[Code] ....

For some reason, the nested while loop keeps repeating even when you input a valid option (1, 2 or 3). I can't seem to figure out why this happens.

View 4 Replies View Related

C/C++ :: Tic Tac Toe Game - Creating A Menu/choice

Nov 11, 2014

Im trying to create something like a menu in a tic tac toe game. I want the computer to ask the user "who starts first" is it the X or the O who starts first? Then the user should type in either X or O but if he types something else i want to ask again .

this is what ive done :

int main () {
printf("
");printf("
");
printf(" %c | %c | %c
", board[1], board[2], board[3]);

[Code] .....

View 10 Replies View Related

Visual C++ :: Enable / Disable Menu Item 2 In OnUpdate Handler Of Menu Item 1?

Sep 15, 2014

I have two menu items. When item 1 is disabled, I want item 2 to be disabled as well. In the OnUpdate handler of menu item 1, I have tried to use "t_pMenu = pCmdUI->m_pMenu;", "t_pMenu = pCmdUI->m_pSubMenu;" and "t_pMenu = pCmdUI->m_pParentMenu;" but I always get NULL t_pMenu. How can I achieve this purpose?

Code:
void CDummyView::OnUpdateMenuItem1(CCmdUI* pCmdUI)
{
if(m_bShowMenuItem1) {
pCmdUI->Enable(TRUE);

[Code]....

View 14 Replies View Related

C++ :: Loading Menu For Files

Jun 11, 2014

I would like to make a program that automatically launches and loads a file when a file of that file type is double clicked within windows. As said I am unsure where to look for some information as to how to do that, and so turn to you all. Is there a simple way of doing such a thing without using any external libraries, if so, a simple tutorial or link to a reference for this; if there is no way of doing this without externals what would be a small and simple to use library for this?

View 2 Replies View Related

C :: Create A Menu With Program

Oct 29, 2014

So, I was trying to code a menu for a personal movie database. But I'm having some problems.So, this is what I did,

Code:
#include<stdio.h>
int main();
{
do
{printf("Menu

[Code]...

But this is not working.Furthermore I would also like add a sub menu.

View 7 Replies View Related

C :: Expandable Menu Framework

Mar 8, 2014

I'm new to C programming and I need to write a "small" expandable menu framework and I don't know where to start off.

This is my task: Create an expandable menu framework in C where you can add a infinite number of entries and Sub menus containing other Menu points or where the entries refer to a external function. So far I've created the structures I need

Code:
//Menu structure
struct menu {
char mtitel[MAX];
struct mpoint point;
struct menu *next, *prev;

[Code] .....

View 2 Replies View Related

C++ :: Add Go Back To Previous Menu

Oct 23, 2014

Here is a simplified version of my Menu class, where submenus can be inserted arbitrarily deep. I need to add a new functionality "go back to previous menu", which I would like to be activated by entering 0 (universal command for all Menu instances). I considered the Memento Pattern, but that doesn't seem to quite fit. add that functionality to my Menu class.

#include <iostream>
#include <cstring>
using namespace std;
const int END = -1, NO_SUBMENU = 0;

[code]....

View 3 Replies View Related

C++ :: Using Char In A Menu / While Loop

May 31, 2013

I'm working on a project that uses type char instead of type int to make selections in a menu that calls functions. I'm really hitting a wall with the while loop, I'm pretty sure my syntax is wrong for type char.

#include <iostream>
#include <cmath>
using namespace std;
// ***********************************************************************
void ShowMenu();
void SquareRoot(double UserEntry);

[Code] .....

View 1 Replies View Related

C++ :: Switch Statement As A Menu?

Nov 1, 2013

I am using a switch statement as a menu. If I enter a non-integer value as my choice, I expect the error message , "Invalid entry", to display but instead the output keeps running.

View 2 Replies View Related

C++ :: Program To Go Through A Menu Won't Compile

Apr 27, 2013

I hate vague errors where I don't even know where to start looking for an error. Error happens immediately and it says "Unhandled exception at 0x5981c9c7 (msvcr100d.dll) in experiment.exe: 0xC0000005: Access violation reading location 0xabababab."

#include <iostream>
#include <string>
#include <conio.h>

[Code].....

View 2 Replies View Related

C++ :: How To Go Back In The Main Menu

Apr 9, 2014

I'm new here! I just wanted to ask, how can I go back to Main menu using this code that I have made (I know it's not yet finish I'm using Visual Studio c++ 2010! I there are any errors in my codes

Project: Computer Shop System

#include <iostream>
#include <string>
using namespace std;
int pcnum[5],x; //choice pc
int pc;
int i; //name
int y; //hours

[Code]...

View 1 Replies View Related

C# :: WPF Menu Item Not Clicking?

Nov 10, 2014

I have made a menuitem using the combo box, but when I add items in like in the image below:

[URL]

My problem is that when I move my mouse over the item it displays this darker box around the text:

[URL]

This stops me from clicking it and the code from being executed.

View 2 Replies View Related

C/C++ :: Main Menu Keeps On Appearing

Apr 5, 2014

#include "Header.h"
#include <iostream>
#include <string>
#include <iomanip>
#include <cmath>
using namespace std;
int option = 0;
char add;

[Code] ....

View 1 Replies View Related

C# :: Adding Program Into Context Menu

Feb 29, 2012

To add my program into the context menu (when the user right click on excel file). I used the following code:

Code:
public static bool AddContextMenuItem(string Extension, string MenuName, string MenuDescription, string MenuCommand)
{
bool ret = false;
RegistryKey rkey = Registry.ClassesRoot.OpenSubKey(Extension);

if (rkey != null)
{
string extstring = rkey.GetValue("").ToString();

[Code] .....

I used the following function to retrieve the excel file path has been rightclick choose to load the program:

Code:
public static void OpenExcelFileWithEasyForm(string filePath)
{
try
{
string excelFilePath = Path.Combine(Path.GetDirectoryName(filePath), string.Format("{0} (EasyForm){1}", Path.GetFileNameWithoutExtension(filePath), Path.GetExtension(filePath)));

[Code] .....

But I still do not load the excel file into my program by selecting the program from ContextMenu (right click on excel file and choose program). Although if select the path to excel file from the program, the data from excel file is loaded into the program.

I'm still missing something at function OpenExcelFileWithEasyForm(). How to complete this function to load the excel file into my program when selecting programs in ContextMenu.

View 1 Replies View Related

C :: How To Make A Menu That Uses Arrow Keys

Feb 12, 2015

My program uses a menu that easily facilitates a person to navigate trough out it but im stuck on a part and I cant go to menu3 with the arrows (only use c code not c++)

#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
#include <windows.h>
void sleep(long int interval) {
for(int i=0;i<interval*1000;i++);}

[Code]...

View 6 Replies View Related

C++ :: How To Set Up Prime Function Program Within Menu

Oct 16, 2013

Can not seem to get the program to perform the calculations within the cases. Also, how do you set up the a prime function program within the menu. Have been trying for five days now.

#include <iostream>
#include <cmath>
#include <cstdlib>
using namespace std;
void showChoices();
double prime(double, double);
double abs(double, double);
double pow(double, double);

[Code]...

View 1 Replies View Related

C++ :: Enable / Disable Menu Item

Nov 19, 2013

I have ploughed through the exchanges in all the forums, yet I still cannot make it work. The following is a tiny Code::Blocks program, written to isolate the problem:

// resource.h
#define IDR_MYMENU101
#define ID_FILE 102
#define ID_DISABLE103
#define ID_ENABLE 104
#define ID_MESSAGE105
#define ID_EXIT106

[code].....

case ID_ENABLE is similar to case ID_DISABLE above, and neither works. case ID_MESSAGE and case ID_EXIT both works as expected.I have tinkered with EnableMenuItem(), but without success.

View 8 Replies View Related

C++ :: Code Structure For Game Menu / UI

Jun 23, 2014

How to structure something like Game Menu. I was googling and did not find anything useful. I am coding a little game and Menu part with few sections like START GAME - SELECT LEVEL - SETTINGS (SOUND, MUSIC AND VIBRATION ON/OF) - CREDITS - EXIT.

And just menu alone seems to have tones of code. I have my state machine working but it seems every subsection of the menu has its own state sort if and duplicate code.

View 2 Replies View Related

C++ :: Setting Up Menu (With 4 Options) As A Function

Mar 4, 2014

I am having problems with setting up a menu as a function. The point of the menu is to display a list of 4 options and the user is supposed to choose one option and then the program will run. I am having trouble understanding how to display the menu once I run it because it is not working.

#include <iostream>
using namespace std;
int menu(int ans); // function declaration for menu
void draw_triangle(int size, char ch); //function declaration for triangle
void draw_downtri( int size, char ch); // function declaration for upside-down triangle
void draw_diamond(int size, char ch); //function declaration for diamond

[Code] ....

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved