C++ :: Login System And Simple Menu With 3 Options

Oct 16, 2013

I need a program that has a login system and then a menu that has 3 options: Add, delete and exit. If I choose Add it wil ask for certain data of 5 students.

Then after registering the 5 students, another menu with the options: Search, Delete and exit. In search it will ask for an ID and then prints all the data of a single student. Delete gives me the option to delete the data of any user I choose.

View 1 Replies


ADVERTISEMENT

C++ :: Simple Program To Display Menu With Options

Mar 23, 2014

I decided to create a simple program to display a menu with options, while that is easy enough I had some difficulty when selecting an option that has options inside which also has an option again. While I had many issues in the past I'm finally finished with it and it works fine, but being new to programming and not knowing various other methods available.

Code:
//:::::::::::::::::::::Simple Menu Program::::::::::::::::
//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

#include <iostream>
#include <string>

//function prototypes

[Code] .....

View 1 Replies View Related

C++ :: Simple Game Menu - Program That Simulates Handheld Gaming System

Sep 26, 2013

I have to write a program that simulates a handheld gaming system. a system can have power toggled so its either on or off. when the system is on, its volume level can be raised or lowerd. a system has minimum volume level of zero and a maximum volume level of 10. a system stores games.

// simple game menu
//simulates a handheld gaming system
using namespace std;
class Game {
public:
Game(int GameNumber = 3, int volume = 10);

[Code] .....

View 1 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

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/C++ :: How To Get Total Number Of Items Selected From Options Menu

Jul 28, 2014

My project is to make a options menu for the user to select a shape and than draw out the shape. That whole process is already done and ready to go. What i am having trouble on is totaling the number of selected shapes. For example, at the end of the program i need to prompt a message saying ("You have selected "shape" this many times "number").

View 1 Replies View Related

C++ :: Login System Which Load Data From Dat

Apr 20, 2014

I am trying to make a log in system which load data from a .dat .... So I have a part of code below

if(radioButton1->Checked)//Login {
String ^ userAC = textBox1->Text;
String ^ userPW = textBox2->Text;
char ACc[300];
char PWc[300];

[Code] ....

I built it and it is a success but when i run it, it have error: Debug Assertion Failed!

Program:....
File:....Microsoft Visual Studio 10.0VCincludexstring
Line: 930

Expression: invalid null pointer
.......

What is going wrong so i try to comment some part to debug. I found that it come form the code

string AC(ACc);
string PW(PWc);
String ^ ACstr;
String ^ PWstr;
MarshalString(ACstr,AC);
MarshalString(PWstr,PW);

I tried to use std::string and System::string when getting data from .dat but it failed so i tried char array.

View 2 Replies View Related

C++ :: New User Login System Error

Mar 18, 2013

I cant seem to be able to make a new user and i cant seem to log in it just says invalid login.

#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<fstream>
#include <string>
using namespace std;
void welcomeScreen() {

[Code] ....

View 14 Replies View Related

C++ :: Add Delete Verify And Print Users In Login System?

May 7, 2013

how to add delete verify and print users in a login system.

View 8 Replies View Related

C++ :: Making A Menu System To Change The Color Of Pixels

Apr 10, 2013

im making a menu system to change the color of pixels in a gravity engine i made. the engine works fine, and the menu colors the particles, but will only ever turn them to red, no matter what color i tell it to change it to.

bool running = true;
bool colorChosen = false;
Uint32 particleColor;
Uint32 randomColor;

[Code]....

View 1 Replies View Related

Visual C++ :: How To Modify System Menu To Execute A Function

Feb 11, 2013

I wish to add the item 'Website' to an MFC Dialog app System Menu so that it can activate the following method:

Code:
void CMyDlg::OnWebpage()
{
ShellExecute( NULL, NULL, _T("[URL]..."), NULL, NULL, 0 );
}// OnWebpage()
I have tried this:

Code:

#define IDM_WEBSITE (WM_USER + 101)
//..
if (!strAboutMenu.IsEmpty())
{
pSysMenu->AppendMenu(MF_SEPARATOR);
pSysMenu->AppendMenu(MF_STRING, IDM_ABOUTBOX, strAboutMenu);
pSysMenu->AppendMenuW(MF_STRING, IDM_WEBSITE, _T("Website"));
}

[Code]...

The code compiles without error but and the 'website' item appears on the System Menu but it doesnt do anything.

I've inspected the following but don't really understand how it works and it seems to me there should be a simpler way to accomplish my end.

Modifying the System Menu By John Simmons 26 Jan 2007 [URL]....

View 8 Replies View Related

C++ :: Possible To Make A Simple Log In System Without The Use Of Database

Aug 28, 2013

i am trying to make a simple log in system without the use of database or whatever it is called.

my only concern is this

cout<<"enter password:";
cin>>pass;

how would i be able to make the characters appear as **** rather than the actual character that i would type as i am typing my password in CIN? or is it even possible?

View 5 Replies View Related

C Sharp :: Detecting Mouse Button Down And Up Events On The System Menu Of Form

Feb 16, 2014

How do I detect left mouse button down and up events on the 'Close' option of the system menu that appears when the mouse is clicked on the top left corner of a form?

View 1 Replies View Related

C++ :: Simple System Management Console Application - Polymorphic?

Mar 16, 2014

I'm building a simple system management console application. I've abstracted the console "Menu" and derived from it a "WelcomeMenu" class with public inheritance.

The problem is that when instantiating a Menu* object and assigning it a new WelcomeMenu...I'm still not able to use WelcomeMenu's "ShowWelcomeMessage() with the Menu* object. Instead, I get "error: Class 'Menu' has no member function call 'ShowWelcomeMessage().' Which is true, but I thought a pointer-to-Menu object should be able to use the public methods of derived classes without casting in this case. Code follows.

// Menu and WelcomeMenu Classes
#ifndef MENU_H
#define MENU_H

#include <ctime>
#include <iostream>
#include <string>

[Code] .....

I get a compiler error when running this simple program:

#include <iostream>
#include <ctime>
#include "Utilities.h"
#include "Menu.h"
using namespace std;

[Code]....

View 2 Replies View Related

C++ ::  Looping Simple Menu - Calculate Dimensions Of Floor Plan In Square Feet?

Oct 2, 2013

What I'm trying to accomplish is to ask the user what their floor plan is (in square feet), have them pick what kind of material they want and give them a general price.

Which is working out great so far, but I would also like to add a loop at the end that cycles back if they want to re-do the estimate with a different material selection and if not exit out the program.

I've been trying do while and if/else loops but i can't get them to work right.

#include <iostream>
#include <string>
using namespace std;
int main() {
string custName, selection;
int custNumber, floorSize, material, contactSystem;

[Code] ....

That's basically what I've come up with so far minus all the erroneous attempts. Though as is I technically complete the assignment, I would like the extra credit from making the last part loop.

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/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 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++ :: Makefile Options To Compile For 64 Bit

Mar 17, 2014

I have called a C function inside C++ code. The .so which gets created is a 32 bit while I am looking for 64 bit . What all options should be mentioned in the Make file to eventually compile and get shared object of ELF64 CLASS ?

Excerpts from Makefile
-----------------------------

CC = gcc
CXX = g++
CPPFLAGS = -I. -I$(S) -DHAVE_CONFIG_H
CFLAGS = -O2 -pipe
CXXFLAGS = -g -O2
LDFLAGS =
LIBS = -lsocket -lnsl

[Code] .....

View 1 Replies View Related

C++ :: Multiple Sort Options?

Jan 9, 2013

I have the following private part of a class defined as follows:

private:
struct stats {
double ISIsum;
int authorCount;
bool operator<(const stats &a) const { return ISIsum > a.ISIsum;}
} *stats_;
bool compareSortByISI(const stats &lhs, const stats &rhs);
};

This enables me to sort this struct by calling:

std::sort(stats_, stats_ + authors_->getMaximumAuthors());

My question is, what if I want to have the option to sort by authorCount or ISIsum at run time. Is there any way to do this?

I can't see how I can override operator< twice and decide which one to call at use time.

View 2 Replies View Related

C++ :: Additional Library Installation Options

Aug 5, 2013

I have been reading up, and it seems that all I need to do to finish up the installation of a library is to add in the search path for the library upon compile time.

Of course, I also read that directly copying the lib files can work too, but that may result in the over-writing of necessary files...

I read a more thorough document on mingw's linking processes and discovered that I could create a folder, install the library in that folder, and add the folder as a search path for mingw (so, basically, all i have to do is install all my libraries under that folder).

View 10 Replies View Related

C++ :: Accessing WiFi Router Options?

Feb 3, 2014

Is there a way to access the router settings via c++? My friend wanted me to write something that would turn off wifi broadcasting on his router when pressing the button in the program. The only way I can think about is to connect to the router via .net framework and then use reverse engineering (on the router settings site) to find a way how to simulate change of option via POST or GET method.

View 5 Replies View Related

C++ :: Adding New Options To String Class

Oct 8, 2014

I'm giving the replace option to my string:

void replace(string oldstring, string newstring) {
int stroldstringpos=b.find(oldstring);
b.replace(stroldstringpos,newstring.length(),newstring);
}

i have 1 error in these function that i'm confused. imagine the newstring size is more big than the oldstring, how can change the string, but only change the oldstring and add what left?
see these:

String test="hi hello world";
test.replace("hi","hello");

the result must be:

hello hello world

how can i change the replace function for it?

View 3 Replies View Related

C# :: Utilize One Panel But Modify It For Various Options?

Feb 5, 2014

Using WPF and .NET 4.0 what would be the best way to utilize one panel but modify it for various options? For instance when having a basic or advanced view how would I go about changign the area to add buttons or other items most efficiently?

View 4 Replies View Related

Visual C++ :: If Else Statement Displaying Both Options

Oct 21, 2013

I am new to coding and have a question with my if else statement. This is a VERY simple program that I have made something like in Javascript before, but when I do it in C++ it does not work correctly. It displays both the options. Here is my code.

// Practice.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
using namespace std;
int main()
// Asking for a number {
int x;

[Code] ....

View 14 Replies View Related

C++ :: Command Line Options For Preprocessor Directives

Oct 17, 2014

I want to run the following code from the command line:

Code:
#include <iostream>
using namespace std;

#ifdef ABC
const int num = 105;

[Code] ....

But I can not activate the ABC macro from the command line.

I'm trying to use the -d ABC option following the .exe file name, but I could not run the ABC macro.

How can I activate the ABC macro when I run the .exe file from the Windows 7 command line?

View 13 Replies View Related







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