6 ms·
I agree with what you're saying. It's called: https://en.wikipedia.org/wiki/Object_slicing https://en.wikipedia.org/wiki/Object_slicing. Clearly a footgun in c
by neerajsi 11d ago
I agree with what you're saying. It's called: https://en.wikipedia.org/wiki/Object_slicing https://en.wikipedia.org/wiki/Object_slicing. Clearly a footgun in c++. You have to return a pointer to something that is not locally allocated.