Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Dec 5th, 2012  |  syntax: None  |  size: 16.04 KB  |  views: 27  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. main.cpp: In function ‘int main()’:
  2. main.cpp:64:13: error: invalid user-defined conversion from ‘std::ifstream {aka std::basic_ifstream<char>}’ to ‘int’ [-fpermissive]
  3. In file included from /usr/include/c++/4.7/ios:45:0,
  4.                  from /usr/include/c++/4.7/ostream:40,
  5.                  from /usr/include/c++/4.7/iostream:40,
  6.                  from main.cpp:1:
  7. /usr/include/c++/4.7/bits/basic_ios.h:113:7: note: candidate is: std::basic_ios<_CharT, _Traits>::operator void*() const [with _CharT = char; _Traits = std::char_traits<char>] <near match>
  8. /usr/include/c++/4.7/bits/basic_ios.h:113:7: note:   no known conversion for implicit ‘this’ parameter from ‘void*’ to ‘int’
  9. main.cpp:66:3: error: expected ‘;’ before ‘}’ token
  10. main.cpp:68:11: error: no match for ‘operator<<’ in ‘money << score’
  11. main.cpp:68:11: note: candidates are:
  12. In file included from /usr/include/c++/4.7/string:54:0,
  13.                  from /usr/include/c++/4.7/bits/locale_classes.h:42,
  14.                  from /usr/include/c++/4.7/bits/ios_base.h:43,
  15.                  from /usr/include/c++/4.7/ios:43,
  16.                  from /usr/include/c++/4.7/ostream:40,
  17.                  from /usr/include/c++/4.7/iostream:40,
  18.                  from main.cpp:1:
  19. /usr/include/c++/4.7/bits/basic_string.h:2750: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>&)
  20. /usr/include/c++/4.7/bits/basic_string.h:2750:5: note:   template argument deduction/substitution failed:
  21. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
  22. In file included from /usr/include/c++/4.7/iostream:40:0,
  23.                  from main.cpp:1:
  24. /usr/include/c++/4.7/ostream:469:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT)
  25. /usr/include/c++/4.7/ostream:469:5: note:   template argument deduction/substitution failed:
  26. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
  27. In file included from /usr/include/c++/4.7/iostream:40:0,
  28.                  from main.cpp:1:
  29. /usr/include/c++/4.7/ostream:474:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char)
  30. /usr/include/c++/4.7/ostream:474:5: note:   template argument deduction/substitution failed:
  31. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
  32. In file included from /usr/include/c++/4.7/iostream:40:0,
  33.                  from main.cpp:1:
  34. /usr/include/c++/4.7/ostream:480:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, char)
  35. /usr/include/c++/4.7/ostream:480:5: note:   template argument deduction/substitution failed:
  36. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
  37. In file included from /usr/include/c++/4.7/iostream:40:0,
  38.                  from main.cpp:1:
  39. /usr/include/c++/4.7/ostream:486:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, signed char)
  40. /usr/include/c++/4.7/ostream:486:5: note:   template argument deduction/substitution failed:
  41. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
  42. In file included from /usr/include/c++/4.7/iostream:40:0,
  43.                  from main.cpp:1:
  44. /usr/include/c++/4.7/ostream:491:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, unsigned char)
  45. /usr/include/c++/4.7/ostream:491:5: note:   template argument deduction/substitution failed:
  46. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
  47. In file included from /usr/include/c++/4.7/iostream:40:0,
  48.                  from main.cpp:1:
  49. /usr/include/c++/4.7/ostream:511:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*)
  50. /usr/include/c++/4.7/ostream:511:5: note:   template argument deduction/substitution failed:
  51. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
  52. In file included from /usr/include/c++/4.7/ostream:607:0,
  53.                  from /usr/include/c++/4.7/iostream:40,
  54.                  from main.cpp:1:
  55. /usr/include/c++/4.7/bits/ostream.tcc:323:5: note: template<class _CharT, class _Traits> std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*)
  56. /usr/include/c++/4.7/bits/ostream.tcc:323:5: note:   template argument deduction/substitution failed:
  57. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
  58. In file included from /usr/include/c++/4.7/iostream:40:0,
  59.                  from main.cpp:1:
  60. /usr/include/c++/4.7/ostream:528:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const char*)
  61. /usr/include/c++/4.7/ostream:528:5: note:   template argument deduction/substitution failed:
  62. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
  63. In file included from /usr/include/c++/4.7/iostream:40:0,
  64.                  from main.cpp:1:
  65. /usr/include/c++/4.7/ostream:541:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const signed char*)
  66. /usr/include/c++/4.7/ostream:541:5: note:   template argument deduction/substitution failed:
  67. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
  68. In file included from /usr/include/c++/4.7/iostream:40:0,
  69.                  from main.cpp:1:
  70. /usr/include/c++/4.7/ostream:546:5: note: template<class _Traits> std::basic_ostream<char, _Traits>& std::operator<<(std::basic_ostream<char, _Traits>&, const unsigned char*)
  71. /usr/include/c++/4.7/ostream:546:5: note:   template argument deduction/substitution failed:
  72. main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
  73. main.cpp:71:18: error: conflicting declaration ‘std::ofstream money’
  74. main.cpp:32:12: error: ‘money’ has a previous declaration as ‘std::ifstream money’
  75. main.cpp:111:25: error: no match for ‘operator>’ in ‘amount_to_bet > money’
  76. main.cpp:111:25: note: candidates are:
  77. In file included from /usr/include/c++/4.7/bits/stl_algobase.h:65:0,
  78.                  from /usr/include/c++/4.7/bits/char_traits.h:41,
  79.                  from /usr/include/c++/4.7/ios:41,
  80.                  from /usr/include/c++/4.7/ostream:40,
  81.                  from /usr/include/c++/4.7/iostream:40,
  82.                  from main.cpp:1:
  83. /usr/include/c++/4.7/bits/stl_pair.h:225:5: note: template<class _T1, class _T2> bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
  84. /usr/include/c++/4.7/bits/stl_pair.h:225:5: note:   template argument deduction/substitution failed:
  85. main.cpp:111:25: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
  86. In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
  87.                  from /usr/include/c++/4.7/bits/char_traits.h:41,
  88.                  from /usr/include/c++/4.7/ios:41,
  89.                  from /usr/include/c++/4.7/ostream:40,
  90.                  from /usr/include/c++/4.7/iostream:40,
  91.                  from main.cpp:1:
  92. /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
  93. /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note:   template argument deduction/substitution failed:
  94. main.cpp:111:25: note:   mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
  95. In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
  96.                  from /usr/include/c++/4.7/bits/char_traits.h:41,
  97.                  from /usr/include/c++/4.7/ios:41,
  98.                  from /usr/include/c++/4.7/ostream:40,
  99.                  from /usr/include/c++/4.7/iostream:40,
  100.                  from main.cpp:1:
  101. /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
  102. /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note:   template argument deduction/substitution failed:
  103. main.cpp:111:25: note:   mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘int’
  104. In file included from /usr/include/c++/4.7/string:54:0,
  105.                  from /usr/include/c++/4.7/bits/locale_classes.h:42,
  106.                  from /usr/include/c++/4.7/bits/ios_base.h:43,
  107.                  from /usr/include/c++/4.7/ios:43,
  108.                  from /usr/include/c++/4.7/ostream:40,
  109.                  from /usr/include/c++/4.7/iostream:40,
  110.                  from main.cpp:1:
  111. /usr/include/c++/4.7/bits/basic_string.h:2603:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
  112. /usr/include/c++/4.7/bits/basic_string.h:2603:5: note:   template argument deduction/substitution failed:
  113. main.cpp:111:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
  114. In file included from /usr/include/c++/4.7/string:54:0,
  115.                  from /usr/include/c++/4.7/bits/locale_classes.h:42,
  116.                  from /usr/include/c++/4.7/bits/ios_base.h:43,
  117.                  from /usr/include/c++/4.7/ios:43,
  118.                  from /usr/include/c++/4.7/ostream:40,
  119.                  from /usr/include/c++/4.7/iostream:40,
  120.                  from main.cpp:1:
  121. /usr/include/c++/4.7/bits/basic_string.h:2615:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
  122. /usr/include/c++/4.7/bits/basic_string.h:2615:5: note:   template argument deduction/substitution failed:
  123. main.cpp:111:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
  124. In file included from /usr/include/c++/4.7/string:54:0,
  125.                  from /usr/include/c++/4.7/bits/locale_classes.h:42,
  126.                  from /usr/include/c++/4.7/bits/ios_base.h:43,
  127.                  from /usr/include/c++/4.7/ios:43,
  128.                  from /usr/include/c++/4.7/ostream:40,
  129.                  from /usr/include/c++/4.7/iostream:40,
  130.                  from main.cpp:1:
  131. /usr/include/c++/4.7/bits/basic_string.h:2627:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
  132. /usr/include/c++/4.7/bits/basic_string.h:2627:5: note:   template argument deduction/substitution failed:
  133. main.cpp:111:25: note:   mismatched types ‘const _CharT*’ and ‘int’
  134. main.cpp:121:25: error: no match for ‘operator>’ in ‘amount_to_bet > money’
  135. main.cpp:121:25: note: candidates are:
  136. In file included from /usr/include/c++/4.7/bits/stl_algobase.h:65:0,
  137.                  from /usr/include/c++/4.7/bits/char_traits.h:41,
  138.                  from /usr/include/c++/4.7/ios:41,
  139.                  from /usr/include/c++/4.7/ostream:40,
  140.                  from /usr/include/c++/4.7/iostream:40,
  141.                  from main.cpp:1:
  142. /usr/include/c++/4.7/bits/stl_pair.h:225:5: note: template<class _T1, class _T2> bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&)
  143. /usr/include/c++/4.7/bits/stl_pair.h:225:5: note:   template argument deduction/substitution failed:
  144. main.cpp:121:25: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
  145. In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
  146.                  from /usr/include/c++/4.7/bits/char_traits.h:41,
  147.                  from /usr/include/c++/4.7/ios:41,
  148.                  from /usr/include/c++/4.7/ostream:40,
  149.                  from /usr/include/c++/4.7/iostream:40,
  150.                  from main.cpp:1:
  151. /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note: template<class _Iterator> bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&)
  152. /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note:   template argument deduction/substitution failed:
  153. main.cpp:121:25: note:   mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
  154. In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0,
  155.                  from /usr/include/c++/4.7/bits/char_traits.h:41,
  156.                  from /usr/include/c++/4.7/ios:41,
  157.                  from /usr/include/c++/4.7/ostream:40,
  158.                  from /usr/include/c++/4.7/iostream:40,
  159.                  from main.cpp:1:
  160. /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note: template<class _IteratorL, class _IteratorR> bool std::operator>(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&)
  161. /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note:   template argument deduction/substitution failed:
  162. main.cpp:121:25: note:   mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘int’
  163. In file included from /usr/include/c++/4.7/string:54:0,
  164.                  from /usr/include/c++/4.7/bits/locale_classes.h:42,
  165.                  from /usr/include/c++/4.7/bits/ios_base.h:43,
  166.                  from /usr/include/c++/4.7/ios:43,
  167.                  from /usr/include/c++/4.7/ostream:40,
  168.                  from /usr/include/c++/4.7/iostream:40,
  169.                  from main.cpp:1:
  170. /usr/include/c++/4.7/bits/basic_string.h:2603:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&)
  171. /usr/include/c++/4.7/bits/basic_string.h:2603:5: note:   template argument deduction/substitution failed:
  172. main.cpp:121:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
  173. In file included from /usr/include/c++/4.7/string:54:0,
  174.                  from /usr/include/c++/4.7/bits/locale_classes.h:42,
  175.                  from /usr/include/c++/4.7/bits/ios_base.h:43,
  176.                  from /usr/include/c++/4.7/ios:43,
  177.                  from /usr/include/c++/4.7/ostream:40,
  178.                  from /usr/include/c++/4.7/iostream:40,
  179.                  from main.cpp:1:
  180. /usr/include/c++/4.7/bits/basic_string.h:2615:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*)
  181. /usr/include/c++/4.7/bits/basic_string.h:2615:5: note:   template argument deduction/substitution failed:
  182. main.cpp:121:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
  183. In file included from /usr/include/c++/4.7/string:54:0,
  184.                  from /usr/include/c++/4.7/bits/locale_classes.h:42,
  185.                  from /usr/include/c++/4.7/bits/ios_base.h:43,
  186.                  from /usr/include/c++/4.7/ios:43,
  187.                  from /usr/include/c++/4.7/ostream:40,
  188.                  from /usr/include/c++/4.7/iostream:40,
  189.                  from main.cpp:1:
  190. /usr/include/c++/4.7/bits/basic_string.h:2627:5: note: template<class _CharT, class _Traits, class _Alloc> bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&)
  191. /usr/include/c++/4.7/bits/basic_string.h:2627:5: note:   template argument deduction/substitution failed:
  192. main.cpp:121:25: note:   mismatched types ‘const _CharT*’ and ‘int’
clone this paste RAW Paste Data