foo.cpp: In function 'int main()':
foo.cpp:8:2: error: 'set' was not declared in this scope
set <int> candidates;
^
foo.cpp:8:7: error: expected primary-expression before 'int'
set <int> candidates;
^
foo.cpp:8:7: error: expected ';' before 'int'
foo.cpp:10:9: error: no match for 'operator<<' (operand types are 'std::istream {aka std::basic_istream<char>}' and 'int')
cin << n;
^
foo.cpp:10:9: note: candidates are:
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\string:52:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\locale_classes.h:40,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\ios_base.h:41,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ios:42,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:38,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:2753:5: note: template<class _CharT, class _Traits, class _Alloc> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
operator<<(basic_ostream<_CharT, _Traits>& __os,
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\basic_string.h:2753:5: note: template argument deduction/substitution failed:
foo.cpp:10:12: note: 'std::istream {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
cin << n;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39:0,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:471:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:471:5: note: template argument deduction/substitution failed:
foo.cpp:10:12: note: 'std::istream {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
cin << n;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39:0,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:476:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:476:5: note: template argument deduction/substitution failed:
foo.cpp:10:12: note: 'std::istream {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<_CharT, _Traits>'
cin << n;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39:0,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:482:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)
operator<<(basic_ostream<char, _Traits>& __out, char __c)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:482:5: note: template argument deduction/substitution failed:
foo.cpp:10:12: note: 'std::istream {aka std::basic_istream<char>}' is not derived from 'std::basic_ostream<char, _Traits>'
cin << n;
^
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream:39:0,
from foo.cpp:1:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:488:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)
operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:488:5: note: template argument deduction/substitution failed:
foo.cpp:10:12: note: