Quote:
Originally Posted by LittleDude
so it works?
|
Yes. i got it to work, but now i'm wondering another thing.
When you select a choice it displays the output. Then it say's:
"Press any key to close..." or whatever. How can i add the other 3 choices instead of press any key to close.."
LIke ex:
YOU'VE SELECTED #2
blah blah blah
1. CS4$
3. Credits
4. Program info
0. Exit
(Like what im saying if you dont understand is, after you have already selected one an the output has came up on the program, under it bring the menu choice back up then after you've completely gone through the menu choices be able to press any key to close.
Here's the code now:
Code:
#include <iostream>
using namespace std;
void ShowFirstOption();
void ShowSecondOption();
void ShowThirdOption();
void ShowFourthOption();
int main()
{
int choice;
cout << "\t\n\n+-----------------------------------------------------------------------+"
"\n| |"
"\n| C++ Code / Program written Brit no0bsawcE! Jamerson! |"
"\t| Software under-developement! :) | "
"\n| visit us at www.mo0seclan.xanimos.com |"
"\t| |"
"\n+-----------------------------------------------------------------------+\n"
"\n\n\t Select a choice that you would like to learn more information about:\n\n"
"1: CS4$!\n"
"2: <Mo0se> Clan Community!\n"
"3: Credits!\n"
"4: Program info!\n"
"0: Exit!\n\n";
cin >> choice;
/*if( choice < 0 || choice > 3 ) // dont really need to check this because the default case will handle it
{
exit(0);
}
else
{*/
switch(choice)
{
case 1: ShowFirstOption();
break;
case 2: ShowSecondOption();
break;
case 3: ShowThirdOption();
break;
case 4: ShowFourthOption();
break;
default: exit(0);
break;
}
return 0;
}
void ShowFirstOption()
{
cout << "YOU'VE SELECTED OPTION #1\n\n"
"\t[---------------------------CS4$--------------------------------]\n"
"\t Counter-Strike4Cash is an online arena for cash and prizes.\n"
"\t Everyone will risk the same amount of\n"
"\t cash PR(Per Round.)\n"
"\t When you take a portion of someones HP, you recieve an equal portion\n"
"\t of cash from them.\n"
"\t You Can Check them out at www.counter-strike4cash.com!\n"
"\t[---------------------------CS4$--------------------------------]\n\n\t\t";
system("PAUSE");
}
void ShowSecondOption()
{
cout << "YOU'VE SELECTED OPTION #2\n\n"
"\t[---------------------------Mo0se--------------------------------]\n"
"\t <Mo0se> Clan was founded by myself an THEpro.\n"
"\t We are currently Recruiting only expierenced CSS Surf Players."
"\t Check out our site @ www.mo0seclan.xanimos.com !\n"
"\t[---------------------------Mo0se--------------------------------]\n\n\n"
"[---------------------------Members--------------------------------]\n\n"
" 1. no0bsawcE! <Mo0se> - Brit Jamerson."
"\n 2. THEpro <Mo0se> - Brad Duke."
"\n 3. Chinese <Mo0se> - Dustin Lum.\n"
"\b 4. TiM <Mo0se> - Tim.\n"
"[---------------------------Members--------------------------------]\n\n\t";
system("PAUSE");
}
void ShowThirdOption()
{
cout << "YOU'VE SELECTED OPTION #3\n\n"
"\t[---------------------------Credits--------------------------------]\t"
"\t 1. no0bsawcE! <Mo0se> - Brit Jamerson(Me)\n"
"\t 2. LittleDude @ Amxmodx forums for some assistance with code.\n"
"\t[---------------------------Credits--------------------------------]\n\n\n\t\t\t";
system("PAUSE");
}
void ShowFourthOption()
{
cout << "YOU'VE SELECTED OPTION #4\n\n"
"\t[---------------------------Program Info-----------------------------]\n"
"\t Version = 1.0b.\n"
"\t Current State = Beta.\n"
"\t Update1(1.0a) = Removed all if elsestatements.\n"
"\t Update2(1.0b) = Rebuilt the back-bone of the code.\n"
"\t Lead Developer = Brit no0bsawcE! Jamerson\n"
"\t[---------------------------Program Info-----------------------------]\n\n\n\t\t";
system("PAUSE");
}
__________________