Borderou de evaluare (job #733839)
Utilizator |
|
IP | ascuns |
---|---|---|---|
Problemă | Bradul (clasa a 9-a) | Compilator | cpp-32 |
Rundă | Arhiva de probleme | Status | evaluat |
Dată | 28 sept. 2023 07:52:36 | Scor | 0 |
Raport evaluator
Eroare de compilare:
main.cpp: In function 'int main()':
main.cpp:33:17: error: reference to 'ref' is ambiguous
33 | ref=0;
| ^~~
In file included from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/string:51,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/locale_classes.h:40,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/ios_base.h:41,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/ios:42,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/ostream:38,
from /usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/iostream:39,
from main.cpp:1:
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
394 | ref(reference_wrapper<_Tp> __t) noexcept
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:385:10: note: 'template<class _Tp> void std::ref(const _Tp&&)'
385 | void ref(const _Tp&&) = delete;
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:374:5: note: 'template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)'
374 | ref(_Tp& __t) noexcept
| ^~~
main.cpp:8:27: note: 'long long int ref'
8 | long long n, m, b, k, nr, ref, res, g, j;
| ^~~
main.cpp:34:28: error: reference to 'ref' is ambiguous
34 | if(i < 2) {ref = 1;}
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
394 | ref(reference_wrapper<_Tp> __t) noexcept
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:385:10: note: 'template<class _Tp> void std::ref(const _Tp&&)'
385 | void ref(const _Tp&&) = delete;
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:374:5: note: 'template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)'
374 | ref(_Tp& __t) noexcept
| ^~~
main.cpp:8:27: note: 'long long int ref'
8 | long long n, m, b, k, nr, ref, res, g, j;
| ^~~
main.cpp:35:40: error: reference to 'ref' is ambiguous
35 | if(i%2 == 0 && i > 2) {ref = 1;}
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:394:5: note: candidates are: 'template<class _Tp> std::reference_wrapper<_Tp> std::ref(reference_wrapper<_Tp>)'
394 | ref(reference_wrapper<_Tp> __t) noexcept
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:385:10: note: 'template<class _Tp> void std::ref(const _Tp&&)'
385 | void ref(const _Tp&&) = delete;
| ^~~
/usr/lib/gcc/i686-pc-linux-gnu/12/include/g++-v12/bits/refwrap.h:374:5: note: 'template<class _Tp> std::reference_wrapper<_Tp> std::ref(_Tp&)'
374 | ref(_Tp& __t) noexcept
| ^~~