foo.cc: In function 'int main()':
foo.cc:6:24: warning: for increment expression has no effect [-Wunused-value]
6 | for(int i;i<N;i+1)
| ~^~
foo.cc:8:18: warning: statement has no effect [-Wunused-value]
8 | a+i;
| ~^~
foo.cc:6:20: warning: 'i' is used uninitialized [-Wuninitialized]
6 | for(int i;i<N;i+1)
| ~^~
foo.cc:6:17: note: 'i' was declared here
6 | for(int i;i<N;i+1)
| ^
foo.cc:6:20: warning: 'N' is used uninitialized [-Wuninitialized]
6 | for(int i;i<N;i+1)
| ~^~
foo.cc:5:13: note: 'N' was declared here
5 | int N,a;
| ^
foo.cc:10:15: warning: 'a' is used uninitialized [-Wuninitialized]
10 | cout<<a;
| ^
foo.cc:5:15: note: 'a' was declared here
5 | int N,a;
| ^
[Hydro](https://hydro.ac)提供评测服务