Error on the "for" loop line saying Expected unqualified-id
Googling didn't help. People just kept solving the issue and giving fixed code rather than explaining what the issue was.
The code is meant to assign the same value to every array string because assigning during initilization didn't seem to work.
Please give complete code; sometimes errors are knock-on effects from something before. Put your code in code tags.
At the moment, your for loop appears to be outside any function. Did you intend it to be in main()?
You are also going to try to set square[9], which doesn't exist, because your array has 9 elements counting from 0. However, that won't cause the error that you cite.
Sorry bout the no code tags. Couldn't figure that out. I clicked on the code thing in the format section but it did nothing.
I meant for it to exist outside a function but I was obviously wrong and didn't know it had to be in one.
I copied some code from a C++ tutorial site and it counted 1 higher than I needed. Their code didn't have the error so I was trying to compare the two code lines. I then deleted my code to see if putting his code in its place resolved the issue which i didn't which meant that my code was written right. It was just something else, in this case, placement.
I meant for it to exist outside a function but I was obviously wrong and didn't know it had to be in one.
What would it even mean for that code to be outside any function? When would it execute? How would the compiler know when that code was suppose to run?