foo.cpp: In function 'int main()':
foo.cpp:42:12: error: no match for 'operator<<' (operand types are 'std::ostream {aka std::basic_ostream<char>}' and 'integer')
std::cout << a + b << std::endl;
^
foo.cpp:42:12: note: candidates are:
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:108:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ostream_type& (*)(std::basic_ostream<_CharT, _Traits>::__ostream_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
operator<<(__ostream_type& (*__pf)(__ostream_type&))
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:108:7: note: no known conversion for argument 1 from 'integer' to 'std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&) {aka std::basic_ostream<char>& (*)(std::basic_ostream<char>&)}'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:117:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__ios_type& (*)(std::basic_ostream<_CharT, _Traits>::__ios_type&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>; std::basic_ostream<_CharT, _Traits>::__ios_type = std::basic_ios<char>]
operator<<(__ios_type& (*__pf)(__ios_type&))
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:117:7: note: no known conversion for argument 1 from 'integer' to 'std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&) {aka std::basic_ios<char>& (*)(std::basic_ios<char>&)}'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:127:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(std::ios_base& (*)(std::ios_base&)) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
operator<<(ios_base& (*__pf) (ios_base&))
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:127:7: note: no known conversion for argument 1 from 'integer' to 'std::ios_base& (*)(std::ios_base&)'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:166:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
operator<<(long __n)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:166:7: note: no known conversion for argument 1 from 'integer' to 'long int'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:170:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
operator<<(unsigned long __n)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:170:7: note: no known conversion for argument 1 from 'integer' to 'long unsigned int'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:174:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(bool) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
operator<<(bool __n)
^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:174:7: note: no known conversion for argument 1 from 'integer' to 'bool'
In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\ostream:609:0,
from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\iostream: