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)提供评测服务