The code tells me invalid types ‘int[int]’ for array subscript, chat should I change?
#include<bits/stdc++.h>
using namespace std;
int a[110];
int main(){
int n, q, x, y, c, a;
scanf("%d", &n);
int sum = 0;
int ret = 0;
for(int i = 0; i <= n; i++){
scanf("%d", &a[i]);
}
scanf("%d", &q);
for(int i = 0; i <= q; i++){
scanf("%d%d%d", &x, &y, &c);
}
return 0;
}
2 Answers
2 years ago by SheepyAcademy