miss out a single ';' like in this code for a larger program and you'll have 30 errors... it gets confused by the first error, continues till it finds the next ;
then it can't make sense of that statement and carries on, with the next error, as the last error didn't setup properly
and on and on and on.
so you try to fix the error, but undoubtedly you start at the last error (the one you can see) and spend ages to and fro-ing.
Had a buddy who I would sit on calls with while we did our CS projects, different schools. We’d take breaks to help each other every now and again. He spent the better part of an hour looking for an accidental semi-colon that stopped him from compiling. I found it within seconds of seeing his code, right up at the top. He had double clicked it by mistake (“;;”).
Sometimes a fresh set of eyes on your project really does help.
5
u/inotocracy Aug 22 '24
Says it right there in the error message. You need a semicolon at the end of line 5.