The For Loop Tutorial

I receive an error on line 8 of this code while trying to execute the for loop. The console is informing me that it is expecting a closed parenthesis after the number 2. What is wrong with my code here, and how do i fix it?

I’m not familiar enough with C++ to explain the error message but I’d try to delete the space between ! and =.

1 Like

that’s exactly what it was! Thank you. Any idea why that may have been?

! is the binary NOT operator, = is the assignment operator. What you wanted is the inequality operator !=. I can’t explain the excact error message.

1 Like

ahhh! okay. got you. thank you again