记录详情

Runtime Error

foo.cc: In function 'int* m(SeqList&, SeqList&)':
foo.cc:22:24: warning: suggest parentheses around assignment used as truth value [-Wparentheses]
   22 |         {if (obj1.a[i] = obj2.a[j]){*(c+k) = obj1.a[i];k++;};}}
      |              ~~~~~~~~~~^~~~~~~~~~~
foo.cc: In function 'int main()':
foo.cc:35:26: warning: comparison of integer expressions of different signedness: 'int' and 'long unsigned int' [-Wsign-compare]
   35 |         for (int i = 0;i < sizeof(m(c[0], c[1]));i++)
      |                        ~~^~~~~~~~~~~~~~~~~~~~~~~
foo.cc:39:37: warning: deleting array 'c'
   39 |         delete[]a;delete[]b;delete[]c;delete[]m(c[0], c[1]);
      |                                     ^
foo.cc: In constructor 'SeqList::SeqList(int, int*)':
foo.cc:12:9: warning: '*this.SeqList::n' is used uninitialized [-Wuninitialized]
   12 |         {
      |         ^
foo.cc: In function 'int main()':
foo.cc:39:29: warning: 'void operator delete [](void*)' called on unallocated object 'c' [-Wfree-nonheap-object]
   39 |         delete[]a;delete[]b;delete[]c;delete[]m(c[0], c[1]);
      |                             ^~~~~~~~~
foo.cc:33:17: note: declared here
   33 |         SeqList c[2] = { SeqList(n,a),SeqList(n1,b) };
      |                 ^
[Hydro](https://hydro.ac)提供评测服务
# 状态 耗时 内存占用
#1 Runtime Error Aborted 2ms 412.0 KiB

信息

递交者
类型
自测
题目
P1015 OO3-2 无序顺序表类的集合运算
语言
C++
递交时间
2023-05-14 19:51:27
评测时间
2023-05-14 19:51:27
评测机
分数
0
总耗时
2ms
峰值内存
412.0 KiB