Job 14442

Owner
Oana Teodorescu
Problem
Red Dragon
Source
0.65KB
Result
Compile error (Non-zero exit status: 1)

Compiler output

prog.cpp: In function 'int main()':
prog.cpp:34:27: error: reference to 'max' is ambiguous
             if (current > max)
                           ^
prog.cpp:5:11: note: candidates are: long long int max
 long long max, current;
           ^
In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
prog.cpp:36:17: error: reference to 'max' is ambiguous
                 max = current;
                 ^
prog.cpp:5:11: note: candidates are: long long int max
 long long max, current;
           ^
In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^
prog.cpp:40:13: error: reference to 'max' is ambiguous
     cout << max;
             ^
prog.cpp:5:11: note: candidates are: long long int max
 long long max, current;
           ^
In file included from /usr/include/c++/4.9/bits/char_traits.h:39:0,
                 from /usr/include/c++/4.9/ios:40,
                 from /usr/include/c++/4.9/ostream:38,
                 from /usr/include/c++/4.9/iostream:39,
                 from prog.cpp:1:
/usr/include/c++/4.9/bits/stl_algobase.h:261:5: note:                 template<class _Tp, class _Compare> const _Tp& std::max(const _Tp&, const _Tp&, _Compare)
     max(const _Tp& __a, const _Tp& __b, _Compare __comp)
     ^
/usr/include/c++/4.9/bits/stl_algobase.h:217:5: note:                 template<class _Tp> const _Tp& std::max(const _Tp&, const _Tp&)
     max(const _Tp& __a, const _Tp& __b)
     ^

Questions?

Sponsors Gold