main.cpp: In function ‘int main()’: main.cpp:63:5: error: ‘score’ was not declared in this scope main.cpp:65:3: error: expected ‘;’ before ‘}’ token main.cpp:70:11: error: no match for ‘operator<<’ in ‘money << score’ main.cpp:70:11: note: candidates are: In file included from /usr/include/c++/4.7/string:54:0, from /usr/include/c++/4.7/bits/locale_classes.h:42, from /usr/include/c++/4.7/bits/ios_base.h:43, from /usr/include/c++/4.7/ios:43, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/basic_string.h:2750:5: note: template std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const std::basic_string<_CharT, _Traits, _Alloc>&) /usr/include/c++/4.7/bits/basic_string.h:2750:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:469:5: note: template std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, _CharT) /usr/include/c++/4.7/ostream:469:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:474:5: note: template std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, char) /usr/include/c++/4.7/ostream:474:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:480:5: note: template std::basic_ostream& std::operator<<(std::basic_ostream&, char) /usr/include/c++/4.7/ostream:480:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:486:5: note: template std::basic_ostream& std::operator<<(std::basic_ostream&, signed char) /usr/include/c++/4.7/ostream:486:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:491:5: note: template std::basic_ostream& std::operator<<(std::basic_ostream&, unsigned char) /usr/include/c++/4.7/ostream:491:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:511:5: note: template std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const _CharT*) /usr/include/c++/4.7/ostream:511:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ In file included from /usr/include/c++/4.7/ostream:607:0, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/ostream.tcc:323:5: note: template std::basic_ostream<_CharT, _Traits>& std::operator<<(std::basic_ostream<_CharT, _Traits>&, const char*) /usr/include/c++/4.7/bits/ostream.tcc:323:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:528:5: note: template std::basic_ostream& std::operator<<(std::basic_ostream&, const char*) /usr/include/c++/4.7/ostream:528:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:541:5: note: template std::basic_ostream& std::operator<<(std::basic_ostream&, const signed char*) /usr/include/c++/4.7/ostream:541:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream’ In file included from /usr/include/c++/4.7/iostream:40:0, from main.cpp:1: /usr/include/c++/4.7/ostream:546:5: note: template std::basic_ostream& std::operator<<(std::basic_ostream&, const unsigned char*) /usr/include/c++/4.7/ostream:546:5: note: template argument deduction/substitution failed: main.cpp:70:11: note: ‘std::ifstream {aka std::basic_ifstream}’ is not derived from ‘std::basic_ostream’ main.cpp:73:18: error: conflicting declaration ‘std::ofstream money’ main.cpp:31:12: error: ‘money’ has a previous declaration as ‘std::ifstream money’ main.cpp:113:25: error: no match for ‘operator>’ in ‘amount_to_bet > money’ main.cpp:113:25: note: candidates are: In file included from /usr/include/c++/4.7/bits/stl_algobase.h:65:0, from /usr/include/c++/4.7/bits/char_traits.h:41, from /usr/include/c++/4.7/ios:41, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/stl_pair.h:225:5: note: template bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) /usr/include/c++/4.7/bits/stl_pair.h:225:5: note: template argument deduction/substitution failed: main.cpp:113:25: note: mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’ In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0, from /usr/include/c++/4.7/bits/char_traits.h:41, from /usr/include/c++/4.7/ios:41, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note: template bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note: template argument deduction/substitution failed: main.cpp:113:25: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’ In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0, from /usr/include/c++/4.7/bits/char_traits.h:41, from /usr/include/c++/4.7/ios:41, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note: template bool std::operator>(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note: template argument deduction/substitution failed: main.cpp:113:25: note: mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘int’ In file included from /usr/include/c++/4.7/string:54:0, from /usr/include/c++/4.7/bits/locale_classes.h:42, from /usr/include/c++/4.7/bits/ios_base.h:43, from /usr/include/c++/4.7/ios:43, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/basic_string.h:2603:5: note: template bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) /usr/include/c++/4.7/bits/basic_string.h:2603:5: note: template argument deduction/substitution failed: main.cpp:113:25: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’ In file included from /usr/include/c++/4.7/string:54:0, from /usr/include/c++/4.7/bits/locale_classes.h:42, from /usr/include/c++/4.7/bits/ios_base.h:43, from /usr/include/c++/4.7/ios:43, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/basic_string.h:2615:5: note: template bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) /usr/include/c++/4.7/bits/basic_string.h:2615:5: note: template argument deduction/substitution failed: main.cpp:113:25: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’ In file included from /usr/include/c++/4.7/string:54:0, from /usr/include/c++/4.7/bits/locale_classes.h:42, from /usr/include/c++/4.7/bits/ios_base.h:43, from /usr/include/c++/4.7/ios:43, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/basic_string.h:2627:5: note: template bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&) /usr/include/c++/4.7/bits/basic_string.h:2627:5: note: template argument deduction/substitution failed: main.cpp:113:25: note: mismatched types ‘const _CharT*’ and ‘int’ main.cpp:123:25: error: no match for ‘operator>’ in ‘amount_to_bet > money’ main.cpp:123:25: note: candidates are: In file included from /usr/include/c++/4.7/bits/stl_algobase.h:65:0, from /usr/include/c++/4.7/bits/char_traits.h:41, from /usr/include/c++/4.7/ios:41, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/stl_pair.h:225:5: note: template bool std::operator>(const std::pair<_T1, _T2>&, const std::pair<_T1, _T2>&) /usr/include/c++/4.7/bits/stl_pair.h:225:5: note: template argument deduction/substitution failed: main.cpp:123:25: note: mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’ In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0, from /usr/include/c++/4.7/bits/char_traits.h:41, from /usr/include/c++/4.7/ios:41, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note: template bool std::operator>(const std::reverse_iterator<_Iterator>&, const std::reverse_iterator<_Iterator>&) /usr/include/c++/4.7/bits/stl_iterator.h:311:5: note: template argument deduction/substitution failed: main.cpp:123:25: note: mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’ In file included from /usr/include/c++/4.7/bits/stl_algobase.h:68:0, from /usr/include/c++/4.7/bits/char_traits.h:41, from /usr/include/c++/4.7/ios:41, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note: template bool std::operator>(const std::reverse_iterator<_IteratorL>&, const std::reverse_iterator<_IteratorR>&) /usr/include/c++/4.7/bits/stl_iterator.h:361:5: note: template argument deduction/substitution failed: main.cpp:123:25: note: mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘int’ In file included from /usr/include/c++/4.7/string:54:0, from /usr/include/c++/4.7/bits/locale_classes.h:42, from /usr/include/c++/4.7/bits/ios_base.h:43, from /usr/include/c++/4.7/ios:43, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/basic_string.h:2603:5: note: template bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const std::basic_string<_CharT, _Traits, _Alloc>&) /usr/include/c++/4.7/bits/basic_string.h:2603:5: note: template argument deduction/substitution failed: main.cpp:123:25: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’ In file included from /usr/include/c++/4.7/string:54:0, from /usr/include/c++/4.7/bits/locale_classes.h:42, from /usr/include/c++/4.7/bits/ios_base.h:43, from /usr/include/c++/4.7/ios:43, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/basic_string.h:2615:5: note: template bool std::operator>(const std::basic_string<_CharT, _Traits, _Alloc>&, const _CharT*) /usr/include/c++/4.7/bits/basic_string.h:2615:5: note: template argument deduction/substitution failed: main.cpp:123:25: note: mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’ In file included from /usr/include/c++/4.7/string:54:0, from /usr/include/c++/4.7/bits/locale_classes.h:42, from /usr/include/c++/4.7/bits/ios_base.h:43, from /usr/include/c++/4.7/ios:43, from /usr/include/c++/4.7/ostream:40, from /usr/include/c++/4.7/iostream:40, from main.cpp:1: /usr/include/c++/4.7/bits/basic_string.h:2627:5: note: template bool std::operator>(const _CharT*, const std::basic_string<_CharT, _Traits, _Alloc>&) /usr/include/c++/4.7/bits/basic_string.h:2627:5: note: template argument deduction/substitution failed: main.cpp:123:25: note: mismatched types ‘const _CharT*’ and ‘int’