/ 拾陆人 /

记录详情

Compile Error

/in/foo.cc:10:37: error: type/value mismatch at argument 3 in template parameter list for 'template<class _Tp, class _Sequence, class _Compare> class std::priority_queue'
 priority_queue <int,vector<int>,cmp > q;
                                     ^
/in/foo.cc:10:37: note:   expected a type, got 'cmp'
/in/foo.cc: In function 'int main()':
/in/foo.cc:22:5: error: request for member 'push' in 'q', which is of non-class type 'int'
   q.push(i);
     ^~~~
/in/foo.cc:24:12: error: request for member 'empty' in 'q', which is of non-class type 'int'
  while( !q.empty() ){
            ^~~~~
/in/foo.cc:25:9: error: request for member 'top' in 'q', which is of non-class type 'int'
   st= q.top();  q.pop();
         ^~~
/in/foo.cc:25:19: error: request for member 'pop' in 'q', which is of non-class type 'int'
   st= q.top();  q.pop();
                   ^~~
/in/foo.cc:29:7: error: request for member 'push' in 'q', which is of non-class type 'int'
     q.push(t[i]);
       ^~~~

信息

递交者
类型
递交
题目
top排序基础题
语言
C++
递交时间
2017-11-06 08:38:14
评测时间
2017-11-06 08:38:15
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes