I got this error message, "crosses initialization of $variable" yesterday and was utterly mystified. Turns out that I hadn't put brackets around the details of my case statement and it was complaining because it wanted a smaller scope for those variables.
I'm amused that I've gone over 15 years as a programmer and the error message still meant nothing to me at first glance (although the error itself makes perfect sense). I guess this is what happens when I rarely use case statements (and, I must admit, I haven't done much c/c++ lately either). Or maybe the error message has changed? After years of teaching undergraduates, I sort of felt like I'd probably seen most of the errors a compiler had to offer, so I was as pleased by the novelty of having no clue what the message meant as much as I was annoyed at myself for not knowing. ;)
I'm amused that I've gone over 15 years as a programmer and the error message still meant nothing to me at first glance (although the error itself makes perfect sense). I guess this is what happens when I rarely use case statements (and, I must admit, I haven't done much c/c++ lately either). Or maybe the error message has changed? After years of teaching undergraduates, I sort of felt like I'd probably seen most of the errors a compiler had to offer, so I was as pleased by the novelty of having no clue what the message meant as much as I was annoyed at myself for not knowing. ;)