print_number.cpp:11:7: error: invalid operands to binary expression ('std::ostream' (aka 'basic_ostream') and 'void') cout << number_string(6) << " " << number_string(0) << endl; ~~~~ ^ ~~~~~~~~~~~~~~~~ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/system_error:217:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'const std::error_code' for 2nd argument operator<<(basic_ostream<_CharT, _Traits>& __os, const error_code& __e) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:108:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'std::basic_ostream >::__ostream_type &(*)(std::basic_ostream >::__ostream_type &)' (aka 'basic_ostream > &(*)(basic_ostream > &)') for 1st argument operator<<(__ostream_type& (*__pf)(__ostream_type&)) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:117:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'std::basic_ostream >::__ios_type &(*)(std::basic_ostream >::__ios_type &)' (aka 'basic_ios > &(*)(basic_ios > &)') for 1st argument operator<<(__ios_type& (*__pf)(__ios_type&)) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:127:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'std::ios_base &(*)(std::ios_base &)' for 1st argument operator<<(ios_base& (*__pf) (ios_base&)) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:166:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'long' for 1st argument operator<<(long __n) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:170:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'unsigned long' for 1st argument operator<<(unsigned long __n) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:174:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'bool' for 1st argument operator<<(bool __n) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:178:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'short' for 1st argument operator<<(short __n); ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:181:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'unsigned short' for 1st argument operator<<(unsigned short __n) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:189:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'int' for 1st argument operator<<(int __n); ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:192:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'unsigned int' for 1st argument operator<<(unsigned int __n) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:201:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'long long' for 1st argument operator<<(long long __n) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:205:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'unsigned long long' for 1st argument operator<<(unsigned long long __n) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:220:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'double' for 1st argument operator<<(double __f) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:224:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'float' for 1st argument operator<<(float __f) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:232:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'long double' for 1st argument operator<<(long double __f) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:245:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'const void *' for 1st argument operator<<(const void* __p) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:270:7: note: candidate function not viable: cannot convert argument of incomplete type 'void' to 'std::basic_ostream >::__streambuf_type *' (aka 'basic_streambuf > *') for 1st argument operator<<(__streambuf_type* __sb); ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:502:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'char' for 2nd argument operator<<(basic_ostream<_CharT, _Traits>& __out, char __c) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:508:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'char' for 2nd argument operator<<(basic_ostream& __out, char __c) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:514:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'signed char' for 2nd argument operator<<(basic_ostream& __out, signed char __c) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:519:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'unsigned char' for 2nd argument operator<<(basic_ostream& __out, unsigned char __c) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:556:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'const char *' for 2nd argument operator<<(basic_ostream& __out, const char* __s) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:569:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'const signed char *' for 2nd argument operator<<(basic_ostream& __out, const signed char* __s) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:574:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'const unsigned char *' for 2nd argument operator<<(basic_ostream& __out, const unsigned char* __s) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/ostream.tcc:321:5: note: candidate function template not viable: cannot convert argument of incomplete type 'void' to 'const char *' for 2nd argument operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:497:5: note: candidate template ignored: deduced conflicting types for parameter '_CharT' ('char' vs. 'void') operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/bits/basic_string.h:6323:5: note: candidate template ignored: could not match 'basic_string' against 'void' operator<<(basic_ostream<_CharT, _Traits>& __os, ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:539:5: note: candidate template ignored: could not match 'const _CharT *' against 'void' operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s) ^ /usr/bin/../lib/gcc/x86_64-linux-gnu/8/../../../../include/c++/8/ostream:682:5: note: candidate template ignored: substitution failure [with _Ostream = std::basic_ostream &, _Tp = void]: cannot form a reference to 'void' operator<<(_Ostream&& __os, const _Tp& __x) ^ 1 error generated.