记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:76:23: error: invalid user-defined conversion from 'int [10000]' to 'SeqList&' [-fpermissive]
     f1.SetUnion(a1, n1);
                       ^
/in/foo.cc:21:1: note: candidate is: SeqList::SeqList(int) <near match>
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:21:1: note:   conversion of argument 1 would be ill-formed:
/in/foo.cc:76:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
     f1.SetUnion(a1, n1);
                       ^
/in/foo.cc:76:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
/in/foo.cc:21:1: note:   initializing argument 1 of 'SeqList::SeqList(int)'
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:76:23: error: conversion to non-const reference type 'class SeqList&' from rvalue of type 'SeqList' [-fpermissive]
     f1.SetUnion(a1, n1);
                       ^
/in/foo.cc:49:6: note:   initializing argument 1 of 'void SeqList::SetUnion(SeqList&, SeqList&)'
 void SeqList :: SetUnion(SeqList& L, SeqList& a)
      ^~~~~~~
/in/foo.cc:76:23: error: invalid initialization of non-const reference of type 'SeqList&' from an rvalue of type 'SeqList'
     f1.SetUnion(a1, n1);
                       ^
/in/foo.cc:21:1: note:   after user-defined conversion: SeqList::SeqList(int)
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:49:6: note:   initializing argument 2 of 'void SeqList::SetUnion(SeqList&, SeqList&)'
 void SeqList :: SetUnion(SeqList& L, SeqList& a)
      ^~~~~~~
/in/foo.cc:78:23: error: invalid user-defined conversion from 'int [10000]' to 'SeqList&' [-fpermissive]
     f2.SetUnion(a2, n2);
                       ^
/in/foo.cc:21:1: note: candidate is: SeqList::SeqList(int) <near match>
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:21:1: note:   conversion of argument 1 would be ill-formed:
/in/foo.cc:78:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
     f2.SetUnion(a2, n2);
                       ^
/in/foo.cc:78:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
/in/foo.cc:21:1: note:   initializing argument 1 of 'SeqList::SeqList(int)'
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:78:23: error: conversion to non-const reference type 'class SeqList&' from rvalue of type 'SeqList' [-fpermissive]
     f2.SetUnion(a2, n2);
                       ^
/in/foo.cc:49:6: note:   initializing argument 1 of 'void SeqList::SetUnion(SeqList&, SeqList&)'
 void SeqList :: SetUnion(SeqList& L, SeqList& a)
      ^~~~~~~
/in/foo.cc:78:23: error: invalid initialization of non-const reference of type 'SeqList&' from an rvalue of type 'SeqList'
     f2.SetUnion(a2, n2);
                       ^
/in/foo.cc:21:1: note:   after user-defined conversion: SeqList::SeqList(int)
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:49:6: note:   initializing argument 2 of 'void SeqList::SetUnion(SeqList&, SeqList&)'
 void SeqList :: SetUnion(SeqList& L, SeqList& a)
      ^~~~~~~
/in/foo.cc:80:23: error: invalid user-defined conversion from 'int [10000]' to 'SeqList&' [-fpermissive]
     f3.SetUnion(a3, n3);
                       ^
/in/foo.cc:21:1: note: candidate is: SeqList::SeqList(int) <near match>
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:21:1: note:   conversion of argument 1 would be ill-formed:
/in/foo.cc:80:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
     f3.SetUnion(a3, n3);
                       ^
/in/foo.cc:80:23: error: invalid conversion from 'int*' to 'int' [-fpermissive]
/in/foo.cc:21:1: note:   initializing argument 1 of 'SeqList::SeqList(int)'
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:80:23: error: conversion to non-const reference type 'class SeqList&' from rvalue of type 'SeqList' [-fpermissive]
     f3.SetUnion(a3, n3);
                       ^
/in/foo.cc:49:6: note:   initializing argument 1 of 'void SeqList::SetUnion(SeqList&, SeqList&)'
 void SeqList :: SetUnion(SeqList& L, SeqList& a)
      ^~~~~~~
/in/foo.cc:80:23: error: invalid initialization of non-const reference of type 'SeqList&' from an rvalue of type 'SeqList'
     f3.SetUnion(a3, n3);
                       ^
/in/foo.cc:21:1: note:   after user-defined conversion: SeqList::SeqList(int)
 SeqList::SeqList(int n)
 ^~~~~~~
/in/foo.cc:49:6: note:   initializing argument 2 of 'void SeqList::SetUnion(SeqList&, SeqList&)'
 void SeqList :: SetUnion(SeqList& L, SeqList& a)
      ^~~~~~~

信息

递交者
类型
递交
题目
A10-5 集合的并集
比赛
中北数据结构课程赛事二:顺序表类的操作
语言
C++
递交时间
2019-03-10 21:29:18
评测时间
2019-03-10 21:29:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes