what is wrong with this is keeps on crashing????
#include <iostream>
using namespace std;
int main()
{
int answer;
int answer3;
char* answer2 = "terd";
beg:
cout <<"1= yes, 2= no, 0= quit"<< endl;
cout <<"So do u like punk rock music?"<< endl;
cin >> answer;
switch (answer)
{
case 1:
cout <<"That is good because that is a good kinda music!!"<< endl;
goto pt2;
break;
case 2:
cout <<"Well that is too bad, but oh well it is only music!!"<< endl;
return 0;
break;
case 0:
return 0;
break;
default:
cout <<"You are a freaking idiot! That isn't even an option!! Try again!"<< endl;
goto beg;
}
pt2:
cout <<"So who is your favorite punk band?"<< endl;
cin >> answer2;
if (answer2=="anti-flag"||"Anti-Flag"||"antiflag"||"AntiFlag"||"Anti Flag"||"anti flag")
{
cout <<"Wow! " <<answer2<< " is my favorite band too!!!"<< endl;
}
else
{
cout <<"Yeah, " <<answer2<< " is pretty good. My favorite is anti-flag"<< endl;
}
beg2:
cout <<"1= yes, 2= no, 0= quit"<< endl;
cout <<"Do u play and instrument?"<< endl;
cin >> answer3;
switch (answer3)
{
case 1:
cout <<"Oh that's cool what do u play?"<< endl;
break;
case 2:
cout <<"Oh well i do so i am better than you!!!!!!!!"<< endl;
return 0;
break;
case 0:
return 0;
break;
default:
cout <<"You ignorant *****!!! Try again you silly slut!!"<< endl;
goto beg2;
break;
}
//return 0;
//if (answer==0)
return 0;
}