运行 ID: 75141

Main.cc: In function ‘int s(int)’:
Main.cc:7:14: warning: pointer to a function used in arithmetic [-Wpointer-arith]
             s+=i;
             ~^~~
Main.cc:7:16: error: assignment of read-only location ‘s’
             s+=i;
                ^
Main.cc:7:16: error: cannot convert ‘int (*)(int)’ to ‘int(int)’ in assignment
Main.cc:10:12: error: invalid conversion from ‘int (*)(int)’ to ‘int’ [-fpermissive]
     return s;
            ^
Main.cc:4:9: warning: unused variable ‘sum’ [-Wunused-variable]
     int sum=0;
         ^~~