Intermediate C++ Game Programming DirectX [Virtual Funcs. / Polymorphism] Tutorial 18.1

preview_player
Показать описание
Virtual functions (dynamic binding) are kind of a big deal. Polymorphism. Other big words.

Check out my Patreon!

End slate theme: We're all under the stars by Eric Skiff
End slate animation: "Amitai Angor AA VFX"
Рекомендации по теме
Комментарии
Автор

Chili is unmatched, no one is able to explain as good as chili does. Best MENTOR!

bilalwalker
Автор

Hot damn. Wonderful example of the usefulness of std::partition around 12:00, sir.

giancarlo
Автор

hierarchical, virtual functions, polymorphism all are cool shit. Thanks chili

sam_is_people
Автор

so helpful, too many things, i hope i won't forget this, look like things that i need to carry in my career

remantonio
Автор

It was a part that I gave up while studying C++ in university.
I watched the video twice yesterday and today and am trying to understand.
I understand the concept, but actually I don't know if I can use it.
Having fun solving difficult topics like this is another thing.

gguang-jt
Автор

The bottom right square at 9:55 looks like a top-hat.

intelligentshitpastinginc
Автор

I have often asked me the questiion why visual studio create a desctructor as a virtual method - thank you for the answer. :-)

fireballgfx
Автор

That auto cast @11:44 though.. tried to find what would be the correct type for that for a few minutes and internet tells me some gibberish about std::function and typedef's ..

dsu
Автор

I love you man you're too helpful

TheFrnd
Автор

23:22 btw about Unreal Engine. UE4 forbids multiple-inheritance, they are using c++ but how did they do that?

yernaraldabergenov
Автор

Yo Chilli! Amazing tutorial as always man! One quick question,
When you make a base class destructor pure virtual when does it get called if it's definition is in the derived class? Don't you have to explicitly call the base class destructor in the derived class destructor?

song
Автор

hey chili, at 12:28 could we do this in a single statement like so?
std::random_shuffle(t1.begin(), std::partition(t1.begin(), t1.end(), alive_pred) - 1);

loving ur tutorials btw <3

ΙωσήφΣαραφίδης
Автор

Hey man, perfect content, never been so entertained while studying cpp like now!!
I have one question (maybe its noobish one), but whats the difference between these 2 approaches

void Method( MemeFigher& other){
auto *p = other;
... // work with *p
}
and call it with Method(*other)

versus:

void Method( MemeFigher* other){

... // work directly with *other
}
and call it with Method(&other)

Thank guys

GfxWakeup
Автор

So override isn't strictly necessary in order to override a function, it just makes sure you're doing it right. Kind of like @Override in Java.

intelligentshitpastinginc
Автор

Is the advanced stuff coming soon? I sure hope, cause this shit is getting real in here 😈

song
Автор

I know this is just an example, but you don't really need to delete the memory there at the end, right? Since the os will clean it up when the program exits.

Chimponaut
Автор

When I create a vector of class objects (same type) with vector::resize in ctor, do I have to delete them in dtor?

RevanSK
Автор

Hey, chilli, A random question from your framework:

In MainWindow.cpp, in _HandleMsgSetup function,

when you reinterpret_cast LPARAM into CREATESTRUCTW* and then CREATESTRUCTW->lpCreateParams into MainWindow*, you are basically doing MainWindow* = this?

The documentation says that CREATESTRUCTW->lpCreateParams contains lpParam's value from CreateWindow() call. In the framework this function is called in the MainWindow constructor and its lpParam parameter is 'this'.

So am i right?

paulojose
Автор

Hey Chili, how come you dont use namespace std; all of the time.

AnthonyLyristis
Автор

Wow, I been doing some wrong stuff in my use of virtuals

JohnDoe-rwur
welcome to shbcf.ru