foo.cc: In function 'int main()':
foo.cc:11:14: error: 'sum' was not declared in this scope
scanf("%d",&sum);
^~~
foo.cc:11:14: note: suggested alternative: 'nums'
scanf("%d",&sum);
^~~
nums
foo.cc:12:20: error: expected primary-expression before ';' token
for(int i = 0; i< ; i++) {
^
foo.cc:15:22: warning: format '%d' expects argument of type 'int*', but argument 2 has type 'int' [-Wformat=]
scanf("%d %d",i,j);
^
foo.cc:15:22: warning: format '%d' expects argument of type 'int*', but argument 3 has type 'int' [-Wformat=]
foo.cc:8:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d",nums+i);
~~~~~^~~~~~~~~~~~~
foo.cc:15:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d",i,j);
~~~~~^~~~~~~~~~~~~
自豪的采用HydroJudge(https://github.com/hydro-dev/Hydro)进行评测。