I have a problem with my program when I run it! help?

Ok, (1) I ogt my program to run and it works, thanks for the help! :) but there is a glitch in the system that I dont get why it is happening, in the menu when I start it up any section on the menu if I press to go in it it will show me what is inside the section but I had a button that would let me go back to the menu to press something else, one the button want let me type stuff in for some reason if you can help with that but, if I wait about 3-6 seconds something pops up on the screen and it says press enter to continue and there is no way on getting out of it so when I press enter it terminates the program. Have any ideas?
I have absolutely no idea what you are talking about. Is this following from another thread? Is it a GUI menu you're making? What is this "something" that pops up on screen?
I dont know what GUI mean :P, and this is a menu, and I am making it in c++, and if I open the start game section in about 5 seconds this pops up as a line of code like if I wrote it, Press Return To Continue, and there is no way to get out of it, so when I press return the program terminates. Thats it. Any other questions?
Don't know what a GUI is?: http://bit.ly/vZkiPv
What compiler and IDE(if any) are you using? Is it a terminal application?
@Lachlan Easton, The compiler I am using is Microsoft Visual Studio 2010!
this pops up as a line of code like if I wrote it, Press Return To Continue, and there is no way to get out of it, so when I press return the program terminates. Thats it.

You're really not being very clear in your description. Is this in a console window? Is it a dialog? Something else?

How can we possibly help you if you don't properly explain to us what you're seeing?
I Think it will a better idea to post your c++ code here.. so readers can solve your problem...
ok, but yall have seen this code aton! I run it on MicroSoft Visual Studio 2010:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
#include <iostream> 

using namespace std;

void menu (int& a)
{
	cout << " 1 - Start Game.\n";
	cout << " 2 - Online Multiplayer.\n";
	cout << " 3 - Clans.\n";
	cout << " 4 - Achievements.\n";
	cout << " 5 - Downloadable Content.\n";
	cout << " 6 - Settings.\n";
	cout << " 7 - Exit.\n";
	cout << " Enter your choice and press return: ";
	cin >> a;
}

void decision(int& a)
{
	int choice;
	switch (a)
	{

		case 1: cout << "Heres the game!.\n";
		cout << "To Go Back Press 0.\n";
		cin >> a;
		break;

		case 2: cout << "Working on Multiplayer!\n";
		cout << "To Go Back Press 0.\n";

		// rest of code here
		break;
		case 3: cout << " Enter your clan name and press return: ";
		break;

		case 4: cout << "Noob: Play this game online/offline for an hour!\n";
				cout << "Grenade Professional: Get two kills with one grenade!\n";
				cout << "Pro Shooter: Get 100 head shots!\n";
				cout << "Lets Play Online: Play one match online!\n";
				cout << "Offline Professional: Beat offlie!\n";
				cout << "Online Modes: Play one round on every mode online!\n";
				cout << "Sniper Maddness: Play on sniper maddness 10 times!\n";
				cout << "Battle: Play on battle 10 times!\n";
				cout << "Team Battle: Play on team battle 10 times!\n";
				cout << "Versus: Play on versus 10 times!\n";
				cout << "To Go Back Press 0.\n";
		// rest of code here
		break;

		case 5: cout << "Every thing is 99 cents\n";
				cout << "Skin\n";
				cout << "Gamer Point\n";
		break;


		case 6: cout << "Profile\n";
				cout << "Gamer Points\n";
				cout << "Skins\n";
				cout << "Options\n";
		break;

		case 7: cout << "Exit\n";
		break;


		default: cout << "Not a Valid Choice. \n";
				 cout << "Choose again.\n";
		break;

	}

}
int main()
{
	int choice;
	bool gameOn = true;

	menu(choice);
	switch (choice)
	{

	case 1: cout << "Heres the game!.\n";
			cout << "To Go Back Press 0.\n";
	break;

	case 2: cout << "Working on Multiplayer!\n";
			cout <<	"To Go Back Press 0.\n";
	// rest of code here
	break;
	case 3: cout << " Enter your clan name and press return: ";
	break;

	case 4: cout << "Noob: Play this game online/offline for an hour!\n";
			cout << "Grenade Professional: Get two kills with one grenade!.\n";
			cout << "Pro Shooter: Get 100 head shots!\n";
			cout << "Lets Play Online: Play one match online!\n";
			cout << "Offline Professional: Beat offlie!\n";
			cout << "Online Modes: Play one round on every mode online!\n";
			cout << "Sniper Maddness: Play on sniper maddness 10 times!\n";
			cout << "Battle: Play on battle 10 times!\n";
			cout << "Team Battle: Play on team battle 10 times!\n";
			cout << "Versus: Play on versus 10 times!\n";
			cout << "To Go Back Press 0.\n";
			// rest of code here
	break;

	case 5: cout << "Every thing is 99 cents\n";
			cout << "Skin\n";
			cout << "Gamer Points\n";
			cout << "To Go Back Press 0.\n";
	break;

	case 6: cout << "Profile\n";
			cout << "Gamer Points\n";
			cout << "Skins\n";
			cout << "Options\n";
			cout << "To Go Back Press 0.\n";
	break;

	case 7: "Exit\n";
	break;

	gameOn = false;
	break;
	default: cout << "Not a Valid Choice. \n";
			 cout << "Choose again.\n";
			 cin >> choice;
	break;
	}

	system ("pause");
return 0;
}
So, can you try and explain clearly and precisely what it is that you're having trouble with?

Also, what's the point of your decision() function? It's never called anywhere, and it looks as though it just duplicates code that's in your main function.
OK let me try...... I run the program in Microsoft Visual Studio, ONCE I run the program I open up one of the menu sections lets say "Start Game" in start game there is a back button (it is disabled IDK why) it says press 0 then enter to go back to the menu so I can pick another section, after I wait about 4 seconds at the start game section THIS will pop up on my screen, (Press Return To Continue) and I haft to press return no matter what there is no option not to press it, so when I press it terminates the program so then I haft to rerun the program and try to fix the error, is that good enough???
Topic archived. No new replies allowed.