记录详情

Compile Error

/in/foo.cc: In member function 'Array* Array::SetInter(Array&)':
/in/foo.cc:58:27: error: no matching function for call to 'Array::Array(int&)'
  Array *pA =new Array(size);
                           ^
/in/foo.cc:19:1: note: candidate: Array::Array()
 Array::Array()
 ^~~~~
/in/foo.cc:19:1: note:   candidate expects 0 arguments, 1 provided
/in/foo.cc:3:7: note: candidate: constexpr Array::Array(const Array&)
 class Array
       ^~~~~
/in/foo.cc:3:7: note:   no known conversion for argument 1 from 'int' to 'const Array&'
/in/foo.cc: In function 'int main()':
/in/foo.cc:70:9: error: conflicting declaration 'Array* a3'
  Array *a3=a1.SetInter( &a2);
         ^~
/in/foo.cc:67:14: note: previous declaration as 'Array a3'
  Array a1,a2,a3;
              ^~
/in/foo.cc:70:28: error: no matching function for call to 'Array::SetInter(Array*)'
  Array *a3=a1.SetInter( &a2);
                            ^
/in/foo.cc:56:9: note: candidate: Array* Array::SetInter(Array&)
 Array * Array::SetInter(Array &A)
         ^~~~~
/in/foo.cc:56:9: note:   no known conversion for argument 1 from 'Array*' to 'Array&'

信息

递交者
类型
递交
题目
A10-4 集合的交集
比赛
数据结构课堂练习9-16
语言
C++
递交时间
2019-09-16 11:05:57
评测时间
2019-09-16 11:05:57
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes