I am trying to compare two arrays that I have passed through this method. However, I am getting an error that i in the if statement can't be resolved to a variable. I am lost on what I am doing wrong, because I have declared i in the for statement.
Junilu Lacar wrote:. . . a stickler for proper formatting and indentation. . . .
Why should somebody who insists on proper indentation be called a stickler for it? That is like calling somebody a stickler for decent handwriting if I give them some paper which I have written on. If you can't read what I “wrote”, isn't that my fault?
[Edit}[Addition] Wouldn't the IDE also give a warning about empty statements?
I only meant that since I myself am a stickler for proper formatting and indentation, it would make me look twice if my IDE, which is configured to format my code in the 1TBS variant of the K&R style formatting, suddenly formatted an opening brace for a for-statement on a separate line, aligned with the for-statement.
Being a "stickler" in this context was not meant to be pejorative.
If these kind of things don't bother you that much because you're not a stickler for consistent formatting and indentation, then you could easily overlook the brace placement and think that the free-standing block you just created with the ; terminating the for-statement above it is still part of the for-statement, that for some reason or another, the IDE just wanted to switch to Allman style braces for this one for-statement.