SHARE
TWEET

Untitled

heroofhyla Oct 14th, 2014 (edited) 220 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. g++ main.cpp inventoryobject.cpp
  2. main.cpp: In function ‘void displayItemViaGets(InventoryObject&)’:
  3. main.cpp:36:97: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream<char>’ and ‘<unresolved overloaded function type>’)
  4.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  5.                                                                                                  ^
  6. main.cpp:36:97: note: candidates are:
  7. In file included from /usr/include/c++/4.8/iostream:39:0,
  8.                  from main.cpp:1:
  9. /usr/include/c++/4.8/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>]
  10.        operator<<(__ostream_type& (*__pf)(__ostream_type&))
  11.        ^
  12. /usr/include/c++/4.8/ostream:108:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::basic_ostream<char>::__ostream_type& (*)(std::basic_ostream<char>::__ostream_type&) {aka std::basic_ostream<char>& (*)(std::basic_ostream<char>&)}’
  13. /usr/include/c++/4.8/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>]
  14.        operator<<(__ios_type& (*__pf)(__ios_type&))
  15.        ^
  16. /usr/include/c++/4.8/ostream:117:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::basic_ostream<char>::__ios_type& (*)(std::basic_ostream<char>::__ios_type&) {aka std::basic_ios<char>& (*)(std::basic_ios<char>&)}’
  17. /usr/include/c++/4.8/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>]
  18.        operator<<(ios_base& (*__pf) (ios_base&))
  19.        ^
  20. /usr/include/c++/4.8/ostream:127:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::ios_base& (*)(std::ios_base&)’
  21. /usr/include/c++/4.8/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>]
  22.        operator<<(long __n)
  23.        ^
  24. /usr/include/c++/4.8/ostream:166:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long int’
  25. /usr/include/c++/4.8/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>]
  26.        operator<<(unsigned long __n)
  27.        ^
  28. /usr/include/c++/4.8/ostream:170:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long unsigned int’
  29. /usr/include/c++/4.8/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>]
  30.        operator<<(bool __n)
  31.        ^
  32. /usr/include/c++/4.8/ostream:174:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘bool’
  33. In file included from /usr/include/c++/4.8/ostream:609:0,
  34.                  from /usr/include/c++/4.8/iostream:39,
  35.                  from main.cpp:1:
  36. /usr/include/c++/4.8/bits/ostream.tcc:91:5: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(short int) [with _CharT = char; _Traits = std::char_traits<char>]
  37.      basic_ostream<_CharT, _Traits>::
  38.      ^
  39. /usr/include/c++/4.8/bits/ostream.tcc:91:5: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘short int’
  40. In file included from /usr/include/c++/4.8/iostream:39:0,
  41.                  from main.cpp:1:
  42. /usr/include/c++/4.8/ostream:181:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(short unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  43.        operator<<(unsigned short __n)
  44.        ^
  45. /usr/include/c++/4.8/ostream:181:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘short unsigned int’
  46. In file included from /usr/include/c++/4.8/ostream:609:0,
  47.                  from /usr/include/c++/4.8/iostream:39,
  48.                  from main.cpp:1:
  49. /usr/include/c++/4.8/bits/ostream.tcc:105:5: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(int) [with _CharT = char; _Traits = std::char_traits<char>]
  50.      basic_ostream<_CharT, _Traits>::
  51.      ^
  52. /usr/include/c++/4.8/bits/ostream.tcc:105:5: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘int’
  53. In file included from /usr/include/c++/4.8/iostream:39:0,
  54.                  from main.cpp:1:
  55. /usr/include/c++/4.8/ostream:192:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  56.        operator<<(unsigned int __n)
  57.        ^
  58. /usr/include/c++/4.8/ostream:192:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘unsigned int’
  59. /usr/include/c++/4.8/ostream:201:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  60.        operator<<(long long __n)
  61.        ^
  62. /usr/include/c++/4.8/ostream:201:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long long int’
  63. /usr/include/c++/4.8/ostream:205:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long long unsigned int) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  64.        operator<<(unsigned long long __n)
  65.        ^
  66. /usr/include/c++/4.8/ostream:205:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long long unsigned int’
  67. /usr/include/c++/4.8/ostream:220:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  68.        operator<<(double __f)
  69.        ^
  70. /usr/include/c++/4.8/ostream:220:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘double’
  71. /usr/include/c++/4.8/ostream:224:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(float) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  72.        operator<<(float __f)
  73.        ^
  74. /usr/include/c++/4.8/ostream:224:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘float’
  75. /usr/include/c++/4.8/ostream:232:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(long double) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  76.        operator<<(long double __f)
  77.        ^
  78. /usr/include/c++/4.8/ostream:232:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘long double’
  79. /usr/include/c++/4.8/ostream:245:7: note: std::basic_ostream<_CharT, _Traits>::__ostream_type& std::basic_ostream<_CharT, _Traits>::operator<<(const void*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__ostream_type = std::basic_ostream<char>]
  80.        operator<<(const void* __p)
  81.        ^
  82. /usr/include/c++/4.8/ostream:245:7: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘const void*’
  83. In file included from /usr/include/c++/4.8/ostream:609:0,
  84.                  from /usr/include/c++/4.8/iostream:39,
  85.                  from main.cpp:1:
  86. /usr/include/c++/4.8/bits/ostream.tcc:119:5: note: std::basic_ostream<_CharT, _Traits>& std::basic_ostream<_CharT, _Traits>::operator<<(std::basic_ostream<_CharT, _Traits>::__streambuf_type*) [with _CharT = char; _Traits = std::char_traits<char>; std::basic_ostream<_CharT, _Traits>::__streambuf_type = std::basic_streambuf<char>]
  87.      basic_ostream<_CharT, _Traits>::
  88.      ^
  89. /usr/include/c++/4.8/bits/ostream.tcc:119:5: note:   no known conversion for argument 1 from ‘<unresolved overloaded function type>’ to ‘std::basic_ostream<char>::__streambuf_type* {aka std::basic_streambuf<char>*}’
  90. In file included from /usr/include/c++/4.8/iostream:39:0,
  91.                  from main.cpp:1:
  92. /usr/include/c++/4.8/ostream:548:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)
  93.      operator<<(basic_ostream<char, _Traits>& __out, const unsigned char* __s)
  94.      ^
  95. /usr/include/c++/4.8/ostream:548:5: note:   template argument deduction/substitution failed:
  96. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘const unsigned char*’
  97.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  98.                                                                                                          ^
  99. In file included from /usr/include/c++/4.8/iostream:39:0,
  100.                  from main.cpp:1:
  101. /usr/include/c++/4.8/ostream:543:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)
  102.      operator<<(basic_ostream<char, _Traits>& __out, const signed char* __s)
  103.      ^
  104. /usr/include/c++/4.8/ostream:543:5: note:   template argument deduction/substitution failed:
  105. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘const signed char*’
  106.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  107.                                                                                                          ^
  108. In file included from /usr/include/c++/4.8/iostream:39:0,
  109.                  from main.cpp:1:
  110. /usr/include/c++/4.8/ostream:530:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)
  111.      operator<<(basic_ostream<char, _Traits>& __out, const char* __s)
  112.      ^
  113. /usr/include/c++/4.8/ostream:530:5: note:   template argument deduction/substitution failed:
  114. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘const char*’
  115.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  116.                                                                                                          ^
  117. In file included from /usr/include/c++/4.8/ostream:609:0,
  118.                  from /usr/include/c++/4.8/iostream:39,
  119.                  from main.cpp:1:
  120. /usr/include/c++/4.8/bits/ostream.tcc:321:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)
  121.      operator<<(basic_ostream<_CharT, _Traits>& __out, const char* __s)
  122.      ^
  123. /usr/include/c++/4.8/bits/ostream.tcc:321:5: note:   template argument deduction/substitution failed:
  124. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘const char*’
  125.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  126.                                                                                                          ^
  127. In file included from /usr/include/c++/4.8/iostream:39:0,
  128.                  from main.cpp:1:
  129. /usr/include/c++/4.8/ostream:513:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)
  130.      operator<<(basic_ostream<_CharT, _Traits>& __out, const _CharT* __s)
  131.      ^
  132. /usr/include/c++/4.8/ostream:513:5: note:   template argument deduction/substitution failed:
  133. main.cpp:36:105: note:   mismatched types ‘const _CharT*’ and ‘double (InventoryObject::*)()’
  134.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  135.                                                                                                          ^
  136. main.cpp:36:105: note:   could not resolve address from overloaded function ‘item.InventoryObject::getSellPrice’
  137. In file included from /usr/include/c++/4.8/iostream:39:0,
  138.                  from main.cpp:1:
  139. /usr/include/c++/4.8/ostream:493:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)
  140.      operator<<(basic_ostream<char, _Traits>& __out, unsigned char __c)
  141.      ^
  142. /usr/include/c++/4.8/ostream:493:5: note:   template argument deduction/substitution failed:
  143. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘unsigned char’
  144.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  145.                                                                                                          ^
  146. In file included from /usr/include/c++/4.8/iostream:39:0,
  147.                  from main.cpp:1:
  148. /usr/include/c++/4.8/ostream:488:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)
  149.      operator<<(basic_ostream<char, _Traits>& __out, signed char __c)
  150.      ^
  151. /usr/include/c++/4.8/ostream:488:5: note:   template argument deduction/substitution failed:
  152. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘signed char’
  153.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  154.                                                                                                          ^
  155. In file included from /usr/include/c++/4.8/iostream:39:0,
  156.                  from main.cpp:1:
  157. /usr/include/c++/4.8/ostream:482:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)
  158.      operator<<(basic_ostream<char, _Traits>& __out, char __c)
  159.      ^
  160. /usr/include/c++/4.8/ostream:482:5: note:   template argument deduction/substitution failed:
  161. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘char’
  162.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  163.                                                                                                          ^
  164. In file included from /usr/include/c++/4.8/iostream:39:0,
  165.                  from main.cpp:1:
  166. /usr/include/c++/4.8/ostream:476:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
  167.      operator<<(basic_ostream<_CharT, _Traits>& __out, char __c)
  168.      ^
  169. /usr/include/c++/4.8/ostream:476:5: note:   template argument deduction/substitution failed:
  170. main.cpp:36:105: note:   cannot convert ‘item.InventoryObject::getSellPrice’ (type ‘<unresolved overloaded function type>’) to type ‘char’
  171.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  172.                                                                                                          ^
  173. In file included from /usr/include/c++/4.8/iostream:39:0,
  174.                  from main.cpp:1:
  175. /usr/include/c++/4.8/ostream:471:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
  176.      operator<<(basic_ostream<_CharT, _Traits>& __out, _CharT __c)
  177.      ^
  178. /usr/include/c++/4.8/ostream:471:5: note:   template argument deduction/substitution failed:
  179. main.cpp:36:105: note:   could not resolve address from overloaded function ‘item.InventoryObject::getSellPrice’
  180.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  181.                                                                                                          ^
  182. In file included from /usr/include/c++/4.8/string:52:0,
  183.                  from /usr/include/c++/4.8/bits/locale_classes.h:40,
  184.                  from /usr/include/c++/4.8/bits/ios_base.h:41,
  185.                  from /usr/include/c++/4.8/ios:42,
  186.                  from /usr/include/c++/4.8/ostream:38,
  187.                  from /usr/include/c++/4.8/iostream:39,
  188.                  from main.cpp:1:
  189. /usr/include/c++/4.8/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>&)
  190.      operator<<(basic_ostream<_CharT, _Traits>& __os,
  191.      ^
  192. /usr/include/c++/4.8/bits/basic_string.h:2753:5: note:   template argument deduction/substitution failed:
  193. main.cpp:36:105: note:   ‘double (InventoryObject::*)()’ is not derived from ‘const std::basic_string<_CharT, _Traits, _Alloc>’
  194.   std::cout << item.getItemNum() << " " << item.getName() << " " << item.getDescription() << " " << item.getSellPrice <<
  195.                                                                                                          ^
  196. main.cpp:36:105: note:   could not resolve address from overloaded function ‘item.InventoryObject::getSellPrice’
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top