/ Vijos /

记录详情

Compile Error

In file included from c:\mingw\lib\gcc\mingw32\4.8.1\include\c++\algorithm:62:0,
                 from foo.cpp:4:
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 = city*; _Tp = city; _Compare = int (*)(city&, city&)]':
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 = city*; _Compare = int (*)(city&, city&)]'
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 = city*; _Size = int; _Compare = int (*)(city&, city&)]'
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 = city*; _Compare = int (*)(city&, city&)]'
foo.cpp:45: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 'city&' from expression of type 'const city'
    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 'city&' from expression of type 'const city'
    while (__comp(__pivot, *__last))
                                  ^

信息

递交者
类型
递交
题目
P1777 引水入城
语言
C++
递交时间
2016-04-27 10:49:48
评测时间
2016-04-27 10:49:48
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes