Timothy Ko
2011-07-04 20:38:46 UTC
Since it's not structured programming to use goto statements, are we not
supposed to use them?
Also in A4Q1, I have a ton of "if in.fail, then see if it's end of file,
if not then print error message" because of all the times I have to read
the next character. Since I have to break out of the loop for EOF (or
return), I can't use a helper, so it's really cluttering my code. Is
there a way to fix this without goto statements?
Thanks,
Tim
supposed to use them?
Also in A4Q1, I have a ton of "if in.fail, then see if it's end of file,
if not then print error message" because of all the times I have to read
the next character. Since I have to break out of the loop for EOF (or
return), I can't use a helper, so it's really cluttering my code. Is
there a way to fix this without goto statements?
Thanks,
Tim