Main.cc: In function 'int main()': Main.cc:7:8: warning: operation on 'i' may be undefined [-Wsequence-point] i=i=i; ^ Main.cc:9:8: error: 'i' was not declared in this scope if(n==i){ ^