Function pointers, delegates and callbacks | Beginner friendly

preview_player
Показать описание
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️

Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.

The delegate callback pattern is very hard to understand for beginners, but it is important since it is used very often in programming.

In this video, I'm explaining
- what are delegates and callbacks
- what is the delegate callback pattern
- how to implement it in C++
- what kind of relationship it has with function pointers
- how the delegate-callback pattern is used in other programming languages

C++Builder will help us to visualize a practical example, and it'll be easy to understand, so you'll be able to remember it and apply it on your own.

Contents:
00:00 - What will you learn in this video
01:14 - What are delegates
01:58 - Callbacks and delegates
02:22 - Showing the application that we're going to build
03:26 - Building the user interface
07:19 - Send data from parent class to child class
13:00 - Delegate-callback pattern example
23:03 - Summary
23:38 - Tips

Related videos:

Add me on other platforms:
Рекомендации по теме
Комментарии
Автор

📚 Learn how to solve problems and build projects with these Free E-Books ⬇
Experience the power of practical learning, gain career-ready skills, and start building real applications!
This is a step-by-step course designed to take you from beginner to expert in no time!
💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10).
Use it quickly, because it will be available for a limited time.

CodeBeauty
Автор

Amazing, I was neer able to remember this before, but wit your example it is so easy to understand it and remember.

hilgicamala
Автор

U procesu sam učenja c++ jezika i ne mogu ti opisati koliko mi je drago što sam naišao na ovaj kanal gde nudiš fantastična objašnjenja i naravno što je to neko sa naših prostora. Puno pozdrava iz Novog Sada.

kostaaleksic
Автор

amazing as usual, i can easily understand and remember from your videos

deneristargerian
Автор

Important to point out that __closure is C++ Builder specific extension. With standard C++, the function pointer must be a "member function pointer" and it can only be invoked on a specific instance of the class it's a member of.

johanngerell
Автор

Oh, you wont believe but I was introduced to delegates function using also templates with multiple arguments "..." and casting. It mess it up even if C++ is my third programming language.
Here we have great explanation of delegates.

dominiktworek
Автор

I love your videos, you are a great teacher. Thank you, Saldina!

tuazulyrojoeljean
Автор

omg i thought you were gona leave us i like your teaching is good

abdulsamee
Автор

How wonderful the tutorial is! Thank you CodeBeauty. ❤

bhaddiyatanchangya
Автор

I'm still in JS since months and still not at the top with Python, so I let C++ behind. My memory is really too average, if not I would follow all with pleasure. One day maybe I'm back.

consciencedimension
Автор

Only on this channel, i can focus and I can learn full of my concentration anyway Nice to see you again.

x-aminulislam-x
Автор

Amazing tutorial! very clear explanation about what a function pointer is.

thesoftwareproject
Автор

I was hoping the kitten would make an appearance in the video.

aaronsj
Автор

Good work Saldina..

So much love from India. 🙂

prashanth-dnkh
Автор

Great video, nice example. However, keep in mind that <__closure> makes it unnecessary to pass the <ParentForm> member function's pointer as a parameter to <ChildForm> constructor... You can invoke the message display function in the child unit using a closure pointer. Moreover, using a pointer is not mandatory in this particular application. Simply calling the display function using its full path (as a member of <ParentForm> class instance) also works. But, as a way of demonstrating the idea of function pointers, this is a great video.

steveng
Автор

Wow, that's pretty hard. I got to really study this one.

jimpapay
Автор

Could you expand on this video, later, by introducing the Observer Pattern. This video was excellent; but we have become used to excellence on this channel. Thank you.

willofirony
Автор

One like is simply not enough for this tutorial.

emmanuelpaniagua
Автор

- can you explain how c++ work in node js
- and files system in c++
and thank you for your effort

abanoubkerols
Автор

Ćao Saldina. I love all of your videos but im wondering why did you switch from Visual studio to C++ builder? Is it because you step away from the console applications and are using forms? I have Visual studio 2022 and building this project in there is not as straight forward as in your video. Anyway, thank you again for sharing your knowledge. Sve najbolje.

johns