Main.cc: In function ‘int main()’: Main.cc:15:20: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] if(a[1] == k) ^