c++ game help

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2005
Posts: 251
Reputation: dwks has a spectacular aura about dwks has a spectacular aura about 
Solved Threads: 25
dwks's Avatar
dwks dwks is offline Offline
Posting Whiz in Training

Re: c++ game help

 
1
  #11
Jul 24th, 2008
  1. switch (choice)
  2. {
  3. case '1':
  4. saveGame();
  5. case '2':
  6. switch (missionNumber)
  7. {
  8. case 1:
  9. mission1();
  10. case 2:
  11. mission2();
  12. case 3:
  13. mission3();
  14. case 4:
  15. mission4();
  16. case 5:
  17. mission5();
  18. }
  19. case '3':
  20. statScreen();
  21. case '4':
  22. weaponBuy();
  23. case '5':
  24. if (respect != 100)
  25. {
  26. system("CLS");
  27. cout << "Sorry, you have to be 100 respect to use this feature" << endl;
  28. system("PAUSE");
  29. battleScreen();
  30. }
  31. else
  32. {
  33. kMafia();
  34. }
  35. case '6':
  36. enemyPeople();
  37. }
Remember that you need break statements to end each case . . . .
dwk

Seek and ye shall find.

"Only those who will risk going too far can possibly find out how far one can go."
-- TS Eliot.

"I have not failed. I've just found 10,000 ways that won't work."
-- Thomas Alva Edison

"The only real mistake is the one from which we learn nothing."
-- John Powell
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC