Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Deleting int value

$
0
0
Hi, this is my first post so forgive me if I goof up.

I'm trying to write a sign in program and I need to get the value of the sign in code deleted so that it can be used again and recalculated later on. I've searched the internet for deleting int values and all it comes up with is deleting from point values or arrays and I don't have that. After the first run through it gets hung up on "Enter sign in code". I've also tried using a loop but couldn't get it to work...not sure if I did something wrong or not.

any help is appreciated thanks!

#include <iostream>
#include <string>
#include <fstream>
#include <iomanip>

using namespace std;

//Header files
#include "staff.h"



int main()
{	beginning:

	//Variable Declaration
	 int code=0;

	//Prompt for sign in code
	signIn:
	cout << "Enter sign in code: ";
	system("PAUSE");
	cin >> code;
	cout << endl;

		switch (code) 
		{
			case 0: 
				
				goto signIn;
				break;
			case 1:
				Me();
				goto beginning;
				break;
			case 2:
				You();
				break;
			default:
					cout << "value of x unknown";
		}
	
		

	//goto beginning;
//	system("PAUSE");

	
}

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>