Main.cc: In function 'int main()': Main.cc:23:18: error: 'x' was not declared in this scope if(a[i]==x){ ^