Problem | sumint |
---|---|
User | ys |
Submission Time | 2025-03-16 15:34:33 |
Score | 0 |
Max Time | N/A |
Max Memory | N/A |
Owl Get a Life
sumint.cpp: In function ‘int main()’:
sumint.cpp:10:7: error: ‘i’ was not declared in this scope
10 | for (i = 0; i < d; i++) {
| ^
sumint.cpp:11:7: error: no match for ‘operator+=’ (operand types are ‘int’ and ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’})
11 | sum += std::cin >> meows;
| ~~~~^~~~~~~~~~~~~~~~~~~~
sumint.cpp:11:7: note: candidate: ‘operator+=(int&, int)’ <built-in>
sumint.cpp:11:7: note: no known conversion for argument 2 from ‘std::basic_istream<char>::__istream_type’ {aka ‘std::basic_istream<char>’} to ‘int’