Code:
cout<<"\nPlease select the attributes you would likeimprove:"; /*this is where i need help*/
cout<<"\n * 1) Strength\n\n * 2) Wisdom\n\n * 3) Intelligence";
cin>>statup;
switch (Sel) {
case 1:
VNcharacters.str++ ;
startstats = startstats + X;
break;
}
cout<<"\nYou have " <<(startstats)<<" points left\n";
cin.ignore();
cout<<"\nPress any Key to continue..";
to simply decrease startstats by one, you can do
--startstats;
it appears you want to have the selection routine run until you are out of startstats, right? so you should put it in a loop.. somthing to the effect of..
Code:
cout<<"Please select the attributes you would likeimprove:" << endl;
cout << "1) Strength\n2) Wisdom\n3) Intelligence\n4) Quit" << endl;
cin>>statup;
while(Sel > 0 && Sel < 4 && startstats){
switch (Sel) {
case 1:
VNcharacters.str++ ;
--startstats;
break;
}
cout<<"You have " << startstats << " points left" << endl;
cout<<"Please select the attributes you would likeimprove:" << endl;
cout << "1) Strength\n2) Wisdom\n3) Intelligence\n4) Quit" << endl;
cin >> statup;
}
somthing like that.. also should not make your vars global.. you could do your loop and test cases in the loop a number of ways but this hopefully helps a little to give an idea..