记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:44:41: error: too few arguments to function 'void filling(std::vector<int>&, std::vector<bool>&, int, int, int)'
    filling(res, flags, last+1, tmp.index);
                                         ^
/in/foo.cc:15:6: note: declared here
 void filling(vector<int>& vec, vector<bool>& flags, int from, int to, int num) {
      ^~~~~~~
/in/foo.cc:47:35: error: too few arguments to function 'void filling(std::vector<int>&, std::vector<bool>&, int, int, int)'
    filling(res, flags, last+1, n-1);
                                   ^
/in/foo.cc:15:6: note: declared here
 void filling(vector<int>& vec, vector<bool>& flags, int from, int to, int num) {
      ^~~~~~~
/in/foo.cc:48:36: error: too few arguments to function 'void filling(std::vector<int>&, std::vector<bool>&, int, int, int)'
    filling(res, flags, 0, tmp.index);
                                    ^
/in/foo.cc:15:6: note: declared here
 void filling(vector<int>& vec, vector<bool>& flags, int from, int to, int num) {
      ^~~~~~~
/in/foo.cc:49:9: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and '<unresolved overloaded function type>')
    flags[index] = true;
         ^
In file included from /usr/include/c++/6/vector:65:0,
                 from /usr/include/c++/6/queue:61,
                 from /usr/include/x86_64-linux-gnu/c++/6/bits/stdc++.h:86,
                 from /in/foo.cc:2:
/usr/include/c++/6/bits/stl_bvector.h:854:5: note: candidate: std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::reference = std::_Bit_reference; std::vector<bool, _Alloc>::size_type = long unsigned int]
     operator[](size_type __n)
     ^~~~~~~~
/usr/include/c++/6/bits/stl_bvector.h:854:5: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<bool>::size_type {aka long unsigned int}'
/usr/include/c++/6/bits/stl_bvector.h:861:5: note: candidate: std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) const [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::const_reference = bool; std::vector<bool, _Alloc>::size_type = long unsigned int]
     operator[](size_type __n) const
     ^~~~~~~~
/usr/include/c++/6/bits/stl_bvector.h:861:5: note:   no known conversion for argument 1 from '<unresolved overloaded function type>' to 'std::vector<bool>::size_type {aka long unsigned int}'
/in/foo.cc:37:6: warning: unused variable 'sum' [-Wunused-variable]
  int sum = 0;
      ^~~

信息

递交者
类型
自测
题目
P1001 shellpicker与操作系统
语言
C++
递交时间
2020-08-28 17:20:42
评测时间
2020-08-28 17:20:42
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes