GOTO
Ok, this is a simple question. Though i have never felt the need to use goto, why is it 'evil'. I mean i can understand in cases like this where it hurts your brain to look at it :
Code from random person giving example of why goto is evil
But suppose i just want to use one or two, and it helps program flow rather than hinders it? I'm starting to become paranoid that one day i will need to use GOTO then everyone will eat my brain, or i will get run over by a raptor(If you figure out where this reference is from, you get thanked =D).
Code:
//includes
int main() {
int a, b, c;
cin>>a;
cin>>b;
cin>>c;
if(a == 0) goto one;
else goto two;
one:if(b == 0) goto nine;
else goto ten;
two:if(c == 0) goto six;
else goto seven;
nine:if(a > 0) goto two;
//etc etc
}
But suppose i just want to use one or two, and it helps program flow rather than hinders it? I'm starting to become paranoid that one day i will need to use GOTO then everyone will eat my brain, or i will get run over by a raptor(If you figure out where this reference is from, you get thanked =D).
) and it does basically make the code harder to follow etc.
