#include "stdafx.h"
#include <iostream>
using namespace std;
int c1smoke(int xp);
int c1save(int xp);
void GO ();
int main()
{
int RampagePoints =0;
int xp = 0;
int DChoice;
bool start = true;
char strt, BC;
while (start == true)
{
start = false;
cout << "please choose an option\n\n";
cout << "1.number1\n2.number2\n3.number3\" << endl;
cin >> DChoice;
cout << endl << endl;
switch (DChoice)
{
case 1:
{
int choice1;
bool cse1strt = true
;
while (cse1strt = true) // this loop here keeps going eveytime i make a choice from the point
{ // marked "point !"
cse1strt = false;
cout << "You do something....... gaining 1 xp";
++xp;
cout << "\n Now Do you\n1.do this\n2.do that?\n";
cin >> choice1;
switch (choice1)
{
case 1: //inside switch (choice1)
{
xp = c1smoke (xp);
cse1strt = false;
break; \\ Point ! why is it doing this?
}
case 2:
{
c1save (xp);
break;
}
default:{
cout << "That's not an option, try again!";
cse1strt = true;
break;
}
} // end of switch (choice1)
} // end of while cse1strt
}//end of case1
case 2:
{
cout << "not got this far\n\n\n";
++xp;
break;
}
case 3:
{
cout << "coming soon\n\n\n";
++xp;
break;
}
default:
{
cout << "Are you high? That wasnt an option!\n";
}
cout << endl << "total xp = " << xp;
cout << endl << "Would you like to try a different drug?";
cin >> strt;
if (strt == 'y' || 'Y')
{
cout << endl << endl << endl;
start = true;
}
else
start = false;
} // end of switch
return 0;
}// end of while start
}//end of main
void GO ()
{
cout << "GAME OVER!!";
}
int c1smoke(int xp)
{
char any;
cout << "YAY >>> you gain 1 xp";
++xp;
return xp;
}//end of c1smoke
int c1save(int xp)
{
return xp;
}
I hope its not to difficult to understand beacause of the text edits, but i really dont want to offend anybody.
so any ideas as to why the loop wont break when i ask it to? thanks in adavnce guys (and gals) im sure this is no match for your mighty knowledge

New Topic/Question
Reply




MultiQuote



|