/ Vijos /

记录详情

Compile Error

In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62:0,
                 from foo.cpp:3:
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h: In instantiation of '_RandomAccessIterator std::__unguarded_partition(_RandomAccessIterator, _RandomAccessIterator, const _Tp&, _Compare) [with _RandomAccessIterator = Minister*; _Tp = Minister; _Compare = bool (*)(Minister&, Minister&)]':
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2319:78:   required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = Minister*; _Compare = bool (*)(Minister&, Minister&)]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2360:62:   required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = Minister*; _Size = int; _Compare = bool (*)(Minister&, Minister&)]'
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:5513:44:   required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = Minister*; _Compare = bool (*)(Minister&, Minister&)]'
foo.cpp:41:26:   required from here
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2287:35: error: invalid initialization of reference of type 'Minister&' from expression of type 'const Minister'
    while (__comp(*__first, __pivot))
                                   ^
c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\bits\stl_algo.h:2290:34: error: invalid initialization of reference of type 'Minister&' from expression of type 'const Minister'
    while (__comp(__pivot, *__last))
                                  ^

信息

递交者
类型
递交
题目
P1779 国王游戏
语言
C++
递交时间
2016-11-10 19:19:23
评测时间
2016-11-10 19:19:38
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes