goto statement

Hey guys anyone got any idea how to get some kind of counter to count how many times the goto has been used? I'm trying to use my goto; start: function 20 times but cant stop it.

thanks guys
Could you post your code so I can see what you mean?
I think this is in reference to your previous post. You do not need goto.
You never need goto.

1
2
3
int counter = 0;
for( char c = 'A'; c <= 'Z'; ++c )
   ++counter;


counts the number of characters in the alphabet, as an example.

1
2
3
4
5
6
int counter = 0;
char c ='A';
while( c <= 'Z' ) {
   ++c;
   ++counter;
}


does the same thing using a while loop instead.

Topic archived. No new replies allowed.