ooch! Indeed.
same example with virtual destructor:
[Wandbox]三へ( へ՞ਊ ՞)へ ハッハッ
This illustrates you always want to use tools like gcc/clang address sanitizers, or msvc /RTC (Run-Time Error...
Type: Posts; User: Frydac
ooch! Indeed.
same example with virtual destructor:
[Wandbox]三へ( へ՞ਊ ՞)へ ハッハッ
This illustrates you always want to use tools like gcc/clang address sanitizers, or msvc /RTC (Run-Time Error...
You can not create an instance of an abstract/interface class, which is why you can not return an instance.
You can, however, return a pointer/reference to an abstract class, which is created from a...