Main.cc: In function 'int main()': Main.cc:4:3: error: 'cin' was not declared in this scope cin>>n; ^ Main.cc:4:3: note: suggested alternative: In file included from /usr/include/x86_64-linux-gnu/c++/5/bits/stdc++.h:74:0, from Main.cc:1: /usr/include/c++/5/iostream:60:18: note: 'std::cin' extern istream cin; /// Linked to standard input ^