错误的原因就是把不具有下标操作的对象用成了对象[i],比如int对象变量[i]就会报错。仔细检查错误行
可以参考:https://blog.csdn.net/weixin_43744651/article/details/129732598