| Problem | fizzbuzz |
|---|---|
| User | shenshiqi |
| Submission Time | 2025-02-12 15:30:21 |
| Score | 0 |
| Max Time | N/A |
| Max Memory | N/A |
Owl Get a Life
fizzbuzz.cpp: In function ‘std::string output(int, int, int)’:
fizzbuzz.cpp:4:9: error: declaration of ‘std::string a’ shadows a parameter
4 | string a = "";
| ^
fizzbuzz.cpp:5:9: error: no match for ‘operator%’ (operand types are ‘int’ and ‘std::string’ {aka ‘std::__cxx11::basic_string<char>’})
5 | if (num%a == 0) a += "Fizz";
| ~~~^~
| | |
| int std::string {aka std::__cxx11::basic_string<char>}
In file included from /usr/include/c++/9/valarray:603,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:95,
from fizzbuzz.cpp:1:
/usr/include/c++/9/bits/valarray_after.h:409:5: note: candidate: ‘template<class _Dom1, class _Dom2> std::_Expr<std::__detail::_BinClos<std::__modulus, std::_Expr, std::_Expr, _Dom1, _Dom2>, typename std::__fun<std::__modulus, typename _Dom1::value_type>::result_type> std::operator%(const std::_Exp