Pure Virtual Destructors | C++ Tutorial

  Рет қаралды 3,182

Portfolio Courses

Portfolio Courses

Күн бұрын

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
@mba2ceo
@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
@essentia9 2 ай бұрын
Base() - calls the constructor of Base. new Base() allocates memory and creates an object of type Base and returns pointer to it
@mongraal2272
@mongraal2272 2 жыл бұрын
First,love your vids
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
Haha thank you as always.
@Victor-fl8ex
@Victor-fl8ex 2 жыл бұрын
so when you have a pure function into a class (like Base in this case), the entire class becomes abstract automatically?
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
Yes, that's right! :-)
@Victor-fl8ex
@Victor-fl8ex 2 жыл бұрын
@@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?
@PortfolioCourses
@PortfolioCourses 2 жыл бұрын
@@Victor-fl8ex yes, one pure virtual function makes the class abstract
@Victor-fl8ex
@Victor-fl8ex 2 жыл бұрын
@@PortfolioCourses noted. Thanks Kevin!
Virtual Destructors | C++ Tutorial
10:07
Portfolio Courses
Рет қаралды 2,9 М.
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 25 МЛН
Smart Sigma Kid #funny #sigma #comedy
00:40
CRAZY GREAPA
Рет қаралды 31 МЛН
Abstract Classes And Pure Virtual Functions | C++ Tutorial
11:05
Portfolio Courses
Рет қаралды 15 М.
C++ Abstract base classes and pure virtual functions [7]
7:09
Professor Hank Stalica
Рет қаралды 4 М.
Dynamic Binding (Polymorphism) With The Virtual Keyword | C++ Tutorial
9:57
Rust Functions Are Weird (But Be Glad)
19:52
Logan Smith
Рет қаралды 131 М.
How C++ took a turn for the worse
5:03
Code Persist
Рет қаралды 268 М.
Member Initializer Lists | C++ Tutorial
23:10
Portfolio Courses
Рет қаралды 8 М.
Friend Functions | C++ Tutorial
13:05
Portfolio Courses
Рет қаралды 9 М.
Virtual Destructors in C++
7:55
The Cherno
Рет қаралды 104 М.
Heartwarming Unity at School Event #shorts
00:19
Fabiosa Stories
Рет қаралды 25 МЛН