Main.cc: In function ‘int main()’: Main.cc:7:5: error: no match for ‘operator<<’ (operand types are ‘std::istream {aka std::basic_istream}’ and ‘int [10]’) cin< std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) operator<<(basic_ostream<_CharT, _Traits>& __os, ^~~~~~~~ /usr/include/c++/7/bits/basic_string.h:6284:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ cin< std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::error_code&) operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) ^~~~~~~~ /usr/include/c++/7/system_error:217:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ cin< std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT) operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) ^~~~~~~~ /usr/include/c++/7/ostream:497:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ cin< std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char) operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) ^~~~~~~~ /usr/include/c++/7/ostream:502:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ cin< std::basic_ostream& std::operator<<(std::basic_ostream&, char) operator<<(basic_ostream& __out, char __c) ^~~~~~~~ /usr/include/c++/7/ostream:508:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream’ cin< std::basic_ostream& std::operator<<(std::basic_ostream&, signed char) operator<<(basic_ostream& __out, signed char __c) ^~~~~~~~ /usr/include/c++/7/ostream:514:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream’ cin< std::basic_ostream& std::operator<<(std::basic_ostream&, unsigned char) operator<<(basic_ostream& __out, unsigned char __c) ^~~~~~~~ /usr/include/c++/7/ostream:519:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream’ cin< std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*) operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) ^~~~~~~~ /usr/include/c++/7/ostream:539:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ cin< std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*) operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) ^~~~~~~~ /usr/include/c++/7/bits/ostream.tcc:321:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ cin< std::basic_ostream& std::operator<<(std::basic_ostream&, const char*) operator<<(basic_ostream& __out, const char* __s) ^~~~~~~~ /usr/include/c++/7/ostream:556:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream’ cin< std::basic_ostream& std::operator<<(std::basic_ostream&, const signed char*) operator<<(basic_ostream& __out, const signed char* __s) ^~~~~~~~ /usr/include/c++/7/ostream:569:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream’ cin< std::basic_ostream& std::operator<<(std::basic_ostream&, const unsigned char*) operator<<(basic_ostream& __out, const unsigned char* __s) ^~~~~~~~ /usr/include/c++/7/ostream:574:5: note: template argument deduction/substitution failed: Main.cc:7:7: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream’ cin< typename std::enable_if >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) operator<<(_Ostream&& __os, const _Tp& __x) ^~~~~~~~ /usr/include/c++/7/ostream:682:5: note: template argument deduction/substitution failed: /usr/include/c++/7/ostream: In substitution of ‘template typename std::enable_if >, std::__is_convertible_to_basic_ostream<_Ostream>, std::__is_insertable::__ostream_type, const _Tp&, void> >::value, typename std::__is_convertible_to_basic_ostream<_Tp>::__ostream_type>::type std::operator<<(_Ostream&&, const _Tp&) [with _Ostream = std::basic_istream&; _Tp = int [10]]’: Main.cc:7:7: required from here /usr/include/c++/7/ostream:682:5: error: no type named ‘type’ in ‘struct std::enable_if’ Main.cc:8:17: error: ISO C++ forbids comparison between pointer and integer [-fpermissive] for(int i=1;i>=n;n++) cin<=n;n++) cin<}’ and ‘int [1]’) for(int i=1;i>=n;n++) cin< std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::__cxx11::basic_string<_CharT, _Traits, _Alloc>&) operator<<(basic_ostream<_CharT, _Traits>& __os, ^~~~~~~~ /usr/include/c++/7/bits/basic_string.h:6284:5: note: template argument deduction/substitution failed: Main.cc:8:29: note: ‘std::istream {aka std::basic_istream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ for(int i=1;i>=n;n++) cin<