Lambda expressions in modern C++ (in depth step by step tutorial)

Поділитися
Вставка
  • Опубліковано 28 січ 2025

КОМЕНТАРІ •

  • @CodeBeauty
    @CodeBeauty  3 роки тому +30

    📚 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.

  • @coefficient1359
    @coefficient1359 3 роки тому +58

    I have asked for this topic like 7 months back and now got it. Thank you.

  • @abelashenafi6291
    @abelashenafi6291 Рік тому +7

    The beauty about your videos is, I always watch them to learn something I initially intended to but, I always end up learning some extra things. Thanks for that. You're awesome

  • @sunghunet
    @sunghunet 3 роки тому +4

    Today, I first learned lambda function of C++.
    I learned from the best. (Whitney's one of my favorite songs)!!

  • @SAURABHJAIN1989
    @SAURABHJAIN1989 2 роки тому +6

    You are the best C++ Lecturer in UA-cam. You explain the topic with the example, including all other special features of C++. Like in this "lambda function" example, you also included 'Standard Template Library' vector and algorithm. That really connects with the real coding problems and uses of all other important features of C++.
    Thank you for teaching us, all these things :)
    Thanks a lot :)

  • @adhaarsharma753
    @adhaarsharma753 2 роки тому +1

    Exactly what I was looking for. Best channel for C++

  • @j.r.waheed4610
    @j.r.waheed4610 2 роки тому +1

    Thank you. Best C++ lambda introduction I have seen thus far.

  • @hilgicamala2520
    @hilgicamala2520 3 роки тому +5

    You are so talented for teaching, the best teacher ever!

  • @phoebewell3653
    @phoebewell3653 3 роки тому +10

    this video is so easy to understand, love it

  • @awrmike
    @awrmike 3 роки тому +4

    Perfect timing! We are covering Delegates and Lambdas this week in my C# course.

  • @luisfernando3405
    @luisfernando3405 2 роки тому +1

    Hi, I'm from Brazil and a developer beginner but with much years at development using C++; Your channel is my favorite font to learning c++ and english; This is terrific. 🚀🚀

  • @irfanjames6551
    @irfanjames6551 2 роки тому +16

    15:51 You can change the value (only in lambda function) by typing "mutable" between the circle and curly brackets.
    This way you don't have to change the variable in bigger scope by passing with reference.
    Disscussed in Cherno's video on lambdas ua-cam.com/video/mWgmBBz0y8c/v-deo.html

    • @emaayan
      @emaayan Рік тому

      yea i should have gone to cherno to learn about lambdas, cause she defined only function pointers in signatures.

  • @l.p.1967
    @l.p.1967 3 роки тому +17

    The best explanation, I need this video a lot, thank you CodeBeauty!!❤

  • @bimblebom
    @bimblebom Рік тому +1

    Never had a full grasp of lambdas until I watched this video! Thanks beautiful lady 🙂

  • @voseAKUMA
    @voseAKUMA 2 роки тому +5

    Im learning c++ on udemy and I always come to your videos for second help. you always have a great way if explaining these concepts . Thank you for posting these videos. for real!

  • @gollygobih6527
    @gollygobih6527 3 роки тому +13

    Saldina you are the best as always ❤❤❤

  • @glee21012
    @glee21012 3 роки тому +1

    The best explanation of Lammdas I have seen, not filled with computer science geek mumbo jumbo those guys love to spew.

  • @yairfink2368
    @yairfink2368 3 роки тому +2

    I love the way you teach the lesson, and in general your lessos are very helpful. Thank you very much.

  • @rupakdutta5577
    @rupakdutta5577 2 роки тому +5

    I was struggling with this topic since yesterday.. it's all clear to me now! Glad I came across your video..Thank you CodeBeauty, Keep making such videos!

  • @crazylongjumper95
    @crazylongjumper95 2 роки тому

    I have a biomedical engineering master degree, and I decided to learn C++ in the best possible way.
    Thank you so much for existing.

  • @milkamilkica1935
    @milkamilkica1935 3 роки тому +11

    love your videos

  • @MartyAckerman310
    @MartyAckerman310 Рік тому +1

    So pretty much just like Python lambdas, they're used as "throwaway" functions. Thanks for the practical example.

  • @raychou8719
    @raychou8719 2 роки тому +1

    lambda confused me for almost 1 month and i always tried to not read thos code written by lambda untill i watched your video. Thanks so much.

    • @CodeBeauty
      @CodeBeauty  2 роки тому

      I'm so happy that it helped you ☺️ 🤗

  • @DaleDix
    @DaleDix 3 роки тому +3

    First time it's ever really made sense to me. Thanks!

  • @AdrianR.Calimag
    @AdrianR.Calimag 9 місяців тому +1

    Thanks for this lesson. I really need to learn this for our management project. Great teaching as always❤

    • @CodeBeauty
      @CodeBeauty  8 місяців тому

      You are so welcome 🥰

  • @marym9003
    @marym9003 2 роки тому +7

    These books are amazing, thanks for sharing free resources with us Saldina ❤️

  • @yashgarg6871
    @yashgarg6871 3 роки тому +1

    This is my first time visiting this channel and definitely learned something new, Thank you for the tutorial

  • @meem71_2
    @meem71_2 3 роки тому +8

    I finally understood that! Thanks!

  • @charltonmurphy7950
    @charltonmurphy7950 2 роки тому +2

    This video is awesome! Thank you I have a better understanding now. I am a struggling student and your videos help out greatly

  • @ZeroCool2211
    @ZeroCool2211 3 роки тому +6

    So useful and simple.. thank u Saldina 🌷

  • @sabinanurak9633
    @sabinanurak9633 3 роки тому +6

    Very nice! 👍

  • @alokranjan
    @alokranjan 2 роки тому

    you explained lambdas so simply and beutifully

  • @joebosah2727
    @joebosah2727 3 роки тому +5

    Thank you so much

  • @ChrisVideosGreek
    @ChrisVideosGreek 3 роки тому +1

    This book deserves more than a thank you! Really useful!!!

  • @turmitexce
    @turmitexce Місяць тому

    At last, clear and concise, thank you!

  • @shellongchow99
    @shellongchow99 3 роки тому +1

    Great description!Thank you!

  • @Farzadx-65
    @Farzadx-65 Рік тому

    Thanks. Very nice and clear teaching. From Iran 💐

  • @naanpizza3881
    @naanpizza3881 2 роки тому

    wow i never comment on videos but this simple explanation honestly blew my mind! thank you so much

  • @BasicPoke
    @BasicPoke 5 місяців тому

    Well-done explanation of lambdas. Thank you.

  • @tirushsanju2917
    @tirushsanju2917 3 роки тому +8

    Nice job madam. Thank you so much.🤩🤩🤩❤️❤️❤️

  • @anga6275
    @anga6275 3 роки тому +5

    thank you! :)

  • @sahilpawar3768
    @sahilpawar3768 Рік тому +1

    You cleared my basics very well thank you ..!

  • @ousseynounabalma5092
    @ousseynounabalma5092 3 місяці тому

    You remain the Best !!!!

  • @gowthamkumars365
    @gowthamkumars365 3 місяці тому

    This video is worth of a million likes... Explained as easy as pealing a banana...
    Thanks CodeBeauty..

  • @409_manohar6
    @409_manohar6 3 роки тому +13

    Hi mam

  • @MegaAtlus
    @MegaAtlus 3 роки тому +1

    Isn't it a coincidence? I just started using lambdas in C++. Thanks;)

  • @bomabeyoncebobmanuel9096
    @bomabeyoncebobmanuel9096 2 роки тому +1

    Nicely explained. Thank you very much!🥰

  • @SivananthanChelliah
    @SivananthanChelliah Рік тому +1

    not sure if someone mentioned this ..
    the code
    [](int x) {
    if (x % 2 ) == 0 )
    ..
    else
    ..
    can be stored in a variable and then passed it to for_each function like this:
    auto func = [] (int x) { ... };
    std::for_each(v.begin(), v.end(), func);
    to make it clean

  • @iaroslavz2644
    @iaroslavz2644 Рік тому +1

    Thank you very much. It was very good explained.

  • @whiteheart3190
    @whiteheart3190 3 роки тому

    Thanks aloooooooooooot for explaination , quiet and concentrated
    I hope you go forward

  • @marswalker4512
    @marswalker4512 Рік тому

    @CodeBeauty You're really a great teacher. Thank you so much for the classes. Really helpful. Please keep on making videos. God bless you!

  • @Frammqooh1234
    @Frammqooh1234 3 роки тому +1

    GREAT video !! thank you again for another video !

  • @FJProject
    @FJProject Рік тому +1

    7:02 - This kind of structures (classes) with overloaded operator() are called Functors.

  • @pyajudeme9245
    @pyajudeme9245 3 місяці тому

    Best explanation ever!

  • @citoyennumero4434
    @citoyennumero4434 3 роки тому +2

    Des explications claires et simples ! Je vous remercie beaucoup

  • @purduetom90
    @purduetom90 2 роки тому

    Your videos are great! Thank you!

  • @B3rT286
    @B3rT286 9 місяців тому +1

    Thank you for an amazing explanation

  • @chifuyuu1690
    @chifuyuu1690 3 роки тому +12

    3rd~!

  •  3 роки тому

    saldinaaaaaaaaaaaaaaaaaaa! you are a great teacher. absolutely you are the best!!!!! thanks a lot!!!!!!!

  • @AkiaSamuel
    @AkiaSamuel 15 годин тому

    Code Beauty... Every thing here is indeed beautiful... Studying from NAHPI UBa Cameroon. ❤

  • @asishcodes
    @asishcodes 3 роки тому +1

    Thanks for this awesome lecture!

  • @rounakchakraborty5176
    @rounakchakraborty5176 2 роки тому

    Good video. Learned a lot. Thank you❤.

  • @notmyopinion4981
    @notmyopinion4981 3 роки тому

    Hi, I am trying to learn C++ and did watch your learn c++ in 10h FULL COURSE video for beginners and I would like to start with lambda expressions next, since I need it for an assignment for next week(yes I know, lucky me you uploaded this just today :D). You have a lot of videos about different topics regarding C++, stuff that wasn't in your 10h C++ video, so I was curious if I need to watch any other videos before learning about Lambda expressions. It would mean a lot if you could make a playlist which does include all your videos about C++ in the intended order from easiest(beginner) to difficult(advanced). That would mean so much for people like me who want to know it all!!! :)

  • @TKcKoucher
    @TKcKoucher Рік тому

    Excellent content!

  • @SilentReader99
    @SilentReader99 3 роки тому +1

    Thankyou so much...😍Good explanation...It will be helpful for my presentation..😄 please do more videos..

  • @AM-ku9cw
    @AM-ku9cw 3 роки тому +1

    thank you Saldina for the perfect explination

    • @CodeBeauty
      @CodeBeauty  3 роки тому

      you're welcome 🤗🥰

    • @NInJA_VEnOM_17
      @NInJA_VEnOM_17 Рік тому

      ​@@CodeBeauty❤❤❤❤❤❤❤❤❤❤❤❤

  • @MaiNgocDoan1809
    @MaiNgocDoan1809 3 роки тому +1

    Well I love to see more topics about morden c++ like that

  • @nvroshni1546
    @nvroshni1546 2 роки тому

    Thank you! it was quite helpful!

  • @satyajeetkumarjha1482
    @satyajeetkumarjha1482 3 роки тому

    Excellent stuff and you make things look easy.

  • @janmajaykumar131
    @janmajaykumar131 3 роки тому

    All of your videos are extremely important for the beginners like me. I learned a lot from these. Only one catch, beginners like me need a bit more practice problems and as well as a bit more theoretical explanation. Would you recommend some book on c++ which is very close to your lecture spirit or which you find suitable for learning cpp with practicing more? I will be grateful to you for your kind act.

  • @petkopopov2823
    @petkopopov2823 2 роки тому +1

    exelent , learn match more then the course (expensive and to my lang) ! great thanks :)

  • @learntocode5464
    @learntocode5464 2 роки тому

    Thanks, cool and simple explanation

  • @zodiacdeggs1859
    @zodiacdeggs1859 2 роки тому

    Thank you from Beirut

  • @christiancarter255
    @christiancarter255 2 роки тому +1

    I like your pronunciation of "parameter". :)

  • @chandrashekharswain7593
    @chandrashekharswain7593 Рік тому

    Thanks, Great Teaching..

  • @chrischoir3594
    @chrischoir3594 2 роки тому

    this is a great tutorial

  • @xavierfrazao1469
    @xavierfrazao1469 Рік тому

    Very well explained

  • @OzzFan1000
    @OzzFan1000 3 роки тому +1

    Damn that's a handy tool to have! Looks like Lambda expressions can get pretty complex pretty quick though.

  • @newvocabulary
    @newvocabulary 2 роки тому

    Good explanation, thanks.

  • @truecodeface
    @truecodeface 3 роки тому

    I am watching all the vides , thanks a lot about your programming productions, i would like to say that
    one of my important problem is still unsolved on your side.
    and that one is (MY REFUGEE REQUEST AND GETTING ME OUT OF AFGHANISTAN).
    again thanks a lot,
    your SUBSCRIBER Nasrullah Kuhzad from Afghanistan.

  • @cavesalamander6308
    @cavesalamander6308 Рік тому

    C++ Builder?! Hi, colleague! Шt's nice to unexpectedly meet such a rare specimen who is still working with the С++ Builder. But I still use CB2007 (C++99) due to a lot of strange things in many last versions... The very last release looks more acceptable so perhaps it's time to move forward... Thank you for video.

  • @KostopravHD
    @KostopravHD 3 роки тому

    perfect tutor and perfect lesson. Thank you!

  • @sreenadhpottipati9978
    @sreenadhpottipati9978 Рік тому +1

    Great, thank you CodeBeauty

  • @ABHISHEKSINGH-ib9ug
    @ABHISHEKSINGH-ib9ug 2 роки тому

    Thank you for this very informative and beautiful video, CodeBeauty

  • @arnaresh462
    @arnaresh462 2 роки тому +1

    Dear mam u r brilliant

  • @program5004
    @program5004 3 роки тому +1

    Welldone my dear saldina❤

  • @remydepoorter6226
    @remydepoorter6226 3 роки тому +1

    Hello from Belgium

  • @BHARATHKUMAR-gr9km
    @BHARATHKUMAR-gr9km Рік тому

    osm explanation and detailed info. good job thank you

  • @amortalbeing
    @amortalbeing 2 роки тому +1

    Would it not be better to simply use std::getchar() instead of the windows specific "pause>nul" ?

    • @CodeBeauty
      @CodeBeauty  2 роки тому +1

      or cin.get()

    • @CodeBeauty
      @CodeBeauty  2 роки тому +1

      here is a video about that 😃
      ua-cam.com/video/VcLMLEw4sn8/v-deo.html

    • @amortalbeing
      @amortalbeing 2 роки тому

      @@CodeBeauty yeah exactly. it baffles me as to why you went for pause, instead of all the standard options you have? was it all a setup for that single video? :))

  • @patrickmayer9218
    @patrickmayer9218 Рік тому +3

    Just out of curiosity, what is the difference between the variables in the [ ] capture clause and the () parameters?
    And great job with the video, top notch stuff! :)

  • @arcanelore168
    @arcanelore168 11 місяців тому +1

    More good content like this!

    • @CodeBeauty
      @CodeBeauty  11 місяців тому +1

      Join my practical programming course, if you are a Windows PC user, it's the only course you'll ever need to start making real apps 🥰🥰

  • @kavyahegde3586
    @kavyahegde3586 6 місяців тому +1

    New subscriber for you ma'am
    Thank you

  • @darkferiousity
    @darkferiousity 2 роки тому

    Hi codebeuty love your videos thank you very much! Just a tip im not sure if it works in vscode, but in notepad++ you can highlight and hit cntrl+k to comment out all of that code. You can uncomment it by highlighing and cntrl+shift+k. Also you can overwrite a line by highlighting it and using paste directly on it with cntrl+v. If you want to select multiple lines with the cursor to tab several lines etc you can hold shift alt and left click down each line you want to have a multicursor really handy. :)

  • @hailemariameyayu9450
    @hailemariameyayu9450 2 роки тому

    you are briliant thanks.

  • @pablom2274
    @pablom2274 3 роки тому

    awesome! thank you!

  • @rajendranm2204
    @rajendranm2204 2 роки тому

    Thanks for the content

  • @ahmetcelik6686
    @ahmetcelik6686 3 роки тому +7

    You are the best lady you should know that.

  • @Negijicoder
    @Negijicoder 10 місяців тому +2

    Amazing..thx

  • @BizTechLife
    @BizTechLife 2 роки тому +1

    I love your tutorials.😍 feedback: can yo please zoom in the code area? You can remove the folder and class structure views in VS. Thanks 😊 🙏 🤗

  • @ooagabonjoaga2680
    @ooagabonjoaga2680 3 місяці тому

    13:00 thank you for a simple explanation about what capture clause is used for. so many people dont actually fucking explain that it does this. thx

    • @CodeBeauty
      @CodeBeauty  3 місяці тому

      it's my pleasure to be better than others :D