Тёмный

Function pointers, delegates and callbacks | Beginner friendly 

Подписаться
Просмотров 33 тыс.
% 733

📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook
🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/
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.
Download Visual Assist here: bit.ly/WT-CB
I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
Download Ultra Edit here: bit.ly/UE-CB
It is a powerful, secure text editor designed specifically for programmers.
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. You can use the link below to make a contribution: bit.ly/CodeBeauty_BuyMeACoffee
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
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.
Download C++Builder bit.ly/CppBuilderFree
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:
Function pointers for beginners - ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Laiv_E2q_nQ.html
Add me on other platforms:
Instagram 📸 - TrueCodeBeauty
Twitter 🐦- TrueCodeBeauty

Наука

Опубликовано:

 

20 дек 2022

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 71   
@CodeBeauty
@CodeBeauty Год назад
📚 Learn how to solve problems and build projects with these Free E-Books ⬇ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ 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.
@AliMohamed-jt2kq
@AliMohamed-jt2kq Год назад
please try to use visual studio or at least mention the code cause there is different between visual studio code and C++Builder code
@PolarBearSolutions
@PolarBearSolutions Год назад
I really love your video, but i think from a learning point of view using C++ Builder just confuses the implementation. Much prefer it when you use visual studio code.
@nv9usb381
@nv9usb381 Год назад
The best coding channel ever!
@SavageScientist
@SavageScientist Год назад
great example
@hilgicamala2520
@hilgicamala2520 Год назад
Amazing, I was neer able to remember this before, but wit your example it is so easy to understand it and remember.
@deneristargerian6755
@deneristargerian6755 Год назад
amazing as usual, i can easily understand and remember from your videos
@dominiktworek6455
@dominiktworek6455 2 месяца назад
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.
@abdulsamee3704
@abdulsamee3704 Год назад
omg i thought you were gona leave us i like your teaching is good
@CodeBeauty
@CodeBeauty Год назад
I'm not leaving 🥰🥰
@abdulsamee3704
@abdulsamee3704 Год назад
@CodeBeauty I've taken 2 computer science courses with 2 labs, I aced all 4 of those because of your videos, the assignments were easy
@kostaaleksic6629
@kostaaleksic6629 Год назад
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.
@CodeBeauty
@CodeBeauty Год назад
Veliki pozdrav za tebe! Jako volim Novi Sad, ima neku posebnu kulturu, ljudi su divni i rado svratim kad god se ukaže prilika! Želim ti puno sreće i drago mi je da ti moji videi pomažu u učenju programiranja! 🥰❤️
@bhaddiyatanchangya520
@bhaddiyatanchangya520 Год назад
How wonderful the tutorial is! Thank you CodeBeauty. ❤
@tuazulyrojoeljean
@tuazulyrojoeljean 10 месяцев назад
I love your videos, you are a great teacher. Thank you, Saldina!
@thesoftwareproject5798
@thesoftwareproject5798 Год назад
Amazing tutorial! very clear explanation about what a function pointer is.
@aaronsj80
@aaronsj80 Год назад
I was hoping the kitten would make an appearance in the video.
@CodeBeauty
@CodeBeauty Год назад
It has regular appearance on my instagram. It's so cute and playful, I want to share a little bit of his positive energy with the world 🥰
@1conscience0dimension
@1conscience0dimension Год назад
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.
@dundyd3612
@dundyd3612 Год назад
we're all average, but her examples are too good. I sometimes watch her video 2-33 times and her videos always help me remember
@1conscience0dimension
@1conscience0dimension Год назад
@@dundyd3612 yea cool maybe after christmass I'm back for a new wave of codeBeauty
@ikazodba
@ikazodba Год назад
👍 as usual 👍
@x-aminulislam-x
@x-aminulislam-x Год назад
Only on this channel, i can focus and I can learn full of my concentration anyway Nice to see you again.
@jimpapay2895
@jimpapay2895 2 месяца назад
Wow, that's pretty hard. I got to really study this one.
@johanngerell
@johanngerell Год назад
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.
@prashanth-dn2kh
@prashanth-dn2kh Год назад
Good work Saldina.. So much love from India. 🙂
@AlphaRocketLeo
@AlphaRocketLeo Год назад
How to set redirect url in Microsoft login auth . i am using social login in my project for Microsoft login api ? Please figure out
@johns643
@johns643 Год назад
Ć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.
@user-mt8wp7ft6z
@user-mt8wp7ft6z Год назад
could I ask how to use in visual studio code? I don't know how to solve the problem that install curl and link with c++
@Ghisisan_
@Ghisisan_ Год назад
Thanks for this video! Very well explained.🤗 After the last video about AI, I really thought you would let us ask the AI for programming advice from now on. 🤭
@Linuxmusica
@Linuxmusica Год назад
Thanks for the video, but is there any way to explain these concepts without visual program, via terminal apps? It's very confusing because there are many c++ concepts mixured with visual c++ apps (Labels, Edit, Buttons, and so on). It's very hard to understand the main goal.
@jonnathanhilliard5684
@jonnathanhilliard5684 8 месяцев назад
ITs just the same for non visual program, every-time she says ' Form ', just swap the word for ' class '. e.g. parent and child forms, can just be any two classes talking to each other.
@clifforddicarlo9178
@clifforddicarlo9178 4 месяца назад
Are child and parent the same process or two different processes?
@karoldawid8981
@karoldawid8981 Год назад
How to connect MySql database? I'm using Codeblocks and there's no way to solve this problem. Do you know some tricks?
@willofirony
@willofirony Год назад
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.
@maqsoodahmad-vx8jl
@maqsoodahmad-vx8jl Год назад
Thanks mam I request you deeply make tutorial of rad studio and explain for freelancing . Your obedient
@ateeqrajput1
@ateeqrajput1 Год назад
Hello can you make a video on BST implementation and heap it will help a lot thank you
@waheedkhan3508
@waheedkhan3508 Год назад
you are amazing but please speake slowely and clearly that we understand easily b/c we are listning you from pakistan ok mem that's set further more you amazing thank youn for getting my instruction👍👍
@Maxdragon2
@Maxdragon2 Год назад
can u do hashing algorithm pls. Need it for college, Thx.
@pablo17349
@pablo17349 Год назад
Awesome video Saldina! The mic quality is the only thing that I think could be improved. Cheers!
@CodeBeauty
@CodeBeauty Год назад
Agree. I film in a big room that does not have good sound isolation and it has a lot of echo, so if you can suggest a good microphone it's welcomed 🥰🤗
@pablo17349
@pablo17349 Год назад
Absolutely! 🤗
@abanoubkerols
@abanoubkerols Год назад
- can you explain how c++ work in node js - and files system in c++ and thank you for your effort
@dsuniverse132
@dsuniverse132 Год назад
unrelated but is C++ Builder free??
@Doomw1ngs
@Doomw1ngs Год назад
I do have some silly questions I’m about to return after years on coding but I’m between c#,c++. But a friend told me that if I learn python it would be much easier to find job even as freelancer is that a thing out there? Can you tell me you opinion? Because I know c# and c++ are powerful language to learn
@CodeBeauty
@CodeBeauty Год назад
For getting the job fast I'd learn C# 🤗
@Xeler_AI
@Xeler_AI 2 месяца назад
CAN YOU MAKE SERIES ON QT CTREATER C++
@rjackyl
@rjackyl 11 месяцев назад
well, tbh I got quite confused after watching this video (for the first time since I have started watching your channel). Maybe thats because you introduced a new app which I am not used to. My major problem with this is to understand, if all those (pre-defined) buttons, messages, events, windows are actually classes, objects, methods, functions or anything else. Most likely only after I know all that, I will have a chance to understand what is really happening in this video, lol
@vvkbees6473
@vvkbees6473 Год назад
👍
@malcoder
@malcoder Год назад
you're amazing fucking hell!
@CodeBeauty
@CodeBeauty Год назад
😅😁😃
@Logan-nx7ts
@Logan-nx7ts Год назад
no hay subtitulos en español :'v
@yousef9181
@yousef9181 Год назад
Hey there, I found your c++ tutorial very informative and got benefited out of it, we will have to learn java next semester in my university. Can you please make tutorials of java, not everyone explain it the way you did in c++. Would highly appreciate that, best of luck!
@markregione4686
@markregione4686 Год назад
@CodeBeauty 😘
@muhammadinamulhaq4219
@muhammadinamulhaq4219 Год назад
It doesn't work in QT because it asks for specific declaration of class method when assigning to function pointer. Now problem is, how can you define the scope of function pointer in child class? The function is in parent. So the scope is Parent:: To add this scope in child we need to add parent.h in child which ends up in circular imports. What is the solution?
@steveng1660
@steveng1660 5 месяцев назад
Great video, nice example. However, keep in mind that makes it unnecessary to pass the member function's pointer as a parameter to 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 class instance) also works. But, as a way of demonstrating the idea of function pointers, this is a great video.
@inproductions8008
@inproductions8008 Год назад
lol
@infotechlab
@infotechlab Год назад
my god! what's happened?? it's seems you speak faster than usual in this video.. really difficult to follow when you're going to learn something new and tricky, moreover in a foreign language 😏
@AndrewOBannon
@AndrewOBannon Год назад
I'm sorry, but "parameters" is pronounced as "parAmeters" 7:45
@ShubhamSharma-bi6tl
@ShubhamSharma-bi6tl Год назад
Hey Saldina, I'm coming from freecodecamp and your course was great (OOP in C++) 👍 ....
@CodeBeauty
@CodeBeauty Год назад
Thank you and welcome 🤗🤗🥰
@gonzalocorboleguizamo201
@gonzalocorboleguizamo201 Год назад
🤩😍🥰
@ossam10
@ossam10 Год назад
i am coming from FreeCodeCamp 👋
@CodeBeauty
@CodeBeauty Год назад
Welcome 🤗 🥰