Record Detail

Compile Error

In file included from /in/compile/mylist.h:68:0,
                 from /in/compile/maintest.cpp:5:
/in/mylist_impl.h: In instantiation of 'List<T>& List<T>::operator=(const List<T>&) [with T = int]':
/in/compile/maintest.cpp:238:24:   required from here
/in/mylist_impl.h:41:13: error: reference to local variable 'l0' returned [-Werror=return-local-addr]
     List<T> l0(l);
             ^~
/in/mylist_impl.h: In instantiation of 'List<T>& List<T>::operator=(const List<T>&) [with T = bool]':
/in/compile/maintest.cpp:672:14:   required from here
/in/mylist_impl.h:41:13: error: reference to local variable 'l0' returned [-Werror=return-local-addr]
cc1plus: all warnings being treated as errors
/in/compile/Makefile:10: recipe for target 'mylist' failed
make: *** [mylist] Error 1

Information

Submit By
Type
Submission
Homework
Lab 9
Language
C++
Submit At
2022-07-18 16:21:06
Judged At
2022-07-18 16:21:06
Judged By
Score
0
Total Time
0ms
Peak Memory
0 Bytes