Personally, I would advise against using the
system("pause"), because it is platform specific solutions, and do not conform to ANSI standards. maybe this
link would be useful to you.
well, I don't see why do you need the 'make' and 'miss' variable there. you don't use it in your program, so let's delete it. if you want the program to go back to the 'cin', just use another conditional statement. here's what I've done (plus I clean up your code a bit) :
cpp
#include <iostream>
using namespace std;
int main(void){
int total = 0;
int cont = 0;
do{
cout << "Shoot a shot by picking a number between 1 and 2:" << endl;
cin >> total;
switch (total){
case 1:
cout << "You stroked that." << endl;
break;
case 2:
cout << "Shit is broke homie." << endl;
break;
default:
cout<<"Wrong number inserted."<<endl;
}
cout<<"Press '0' for continue or other buttons to end"<<endl;
cin>>cont;
}while(cont==0);
return 0;
}
hope this helps you