About the solution of error: invalid types 'int[int]' for array subscript

If the location of the error statement is an array, the reason for this error is roughly as follows:

Case 1. The current array and a variable name are duplicated.
In this case, oj reportsCEThe current array and a variable name are duplicated

Seeing that a blogger wrote that there may be two other cases, I haven't tested it myself. Guys, take it as a precaution.
insert image description here


If the variable name is inconsistent or not defined, the report is this:
insert image description here

Then C++ and C do not have the prompt that the array index is out of bounds...
insert image description here

Guess you like

Origin blog.csdn.net/weixin_52621323/article/details/123731835