How to use pure virtual destructors in C++, including when they are useful to use. Source code: github.com/portfoliocourses/c.... Check out www.portfoliocourses.com to build a portfolio that will impress employers!
Пікірлер: 10
@mongraal22722 жыл бұрын
First,love your vids
@PortfolioCourses2 жыл бұрын
Haha thank you as always.
@mba2ceo Жыл бұрын
please explain the three new objects. 2:07 New Base() is a function or pointer ? The () confuses me ? so () are NOT needed ? What is the significance of () ?
@essentia9Ай бұрын
Base() - calls the constructor of Base. new Base() allocates memory and creates an object of type Base and returns pointer to it
@Victor-fl8ex2 жыл бұрын
so when you have a pure function into a class (like Base in this case), the entire class becomes abstract automatically?
@PortfolioCourses2 жыл бұрын
Yes, that's right! :-)
@Victor-fl8ex2 жыл бұрын
@@PortfolioCourses But if for example inside your Base clase you have 4 defined functions + 1 pure. Does the class become abatract in this case too?
@PortfolioCourses2 жыл бұрын
@@Victor-fl8ex yes, one pure virtual function makes the class abstract