View difference between Paste ID: 0TqHxmRx and umMdk3fU
SHOW: | | - or go back to the newest paste.
1
main.cpp: In function ‘int main()’:
2-
main.cpp:63:5: error: ‘score’ was not declared in this scope
2+
main.cpp:64:13: error: invalid user-defined conversion from ‘std::ifstream {aka std::basic_ifstream<char>}’ to ‘int’ [-fpermissive]
3-
main.cpp:65:3: error: expected ‘;’ before ‘}’ token
3+
In file included from /usr/include/c++/4.7/ios:45:0,
4-
main.cpp:70:11: error: no match for ‘operator<<’ in ‘money << score’
4+
5-
main.cpp:70:11: note: candidates are:
5+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
15+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
20+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
25+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
30+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
35+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
40+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
45+
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:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<_CharT, _Traits>’
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
56+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
61+
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-
main.cpp:70:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
66+
67-
main.cpp:73:18: error: conflicting declaration ‘std::ofstream money’
67+
main.cpp:68:11: note:   ‘std::ifstream {aka std::basic_ifstream<char>}’ is not derived from ‘std::basic_ostream<char, _Traits>’
68-
main.cpp:31:12: error: ‘money’ has a previous declaration as ‘std::ifstream money’
68+
69-
main.cpp:113:25: error: no match for ‘operator>’ in ‘amount_to_bet > money’
69+
70-
main.cpp:113:25: note: candidates are:
70+
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-
main.cpp:113:25: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
79+
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-
main.cpp:113:25: note:   mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
88+
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-
main.cpp:113:25: note:   mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘int’
97+
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-
main.cpp:113:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
107+
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-
main.cpp:113:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
117+
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-
main.cpp:113:25: note:   mismatched types ‘const _CharT*’ and ‘int’
127+
128-
main.cpp:123:25: error: no match for ‘operator>’ in ‘amount_to_bet > money’
128+
129-
main.cpp:123:25: note: candidates are:
129+
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-
main.cpp:123:25: note:   mismatched types ‘const std::pair<_T1, _T2>’ and ‘int’
138+
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-
main.cpp:123:25: note:   mismatched types ‘const std::reverse_iterator<_Iterator>’ and ‘int’
147+
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-
main.cpp:123:25: note:   mismatched types ‘const std::reverse_iterator<_IteratorL>’ and ‘int’
156+
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-
main.cpp:123:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
166+
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-
main.cpp:123:25: note:   mismatched types ‘const std::basic_string<_CharT, _Traits, _Alloc>’ and ‘int’
176+
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-
main.cpp:123:25: note:   mismatched types ‘const _CharT*’ and ‘int’
186+
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’