C++ OOP (2020) - What are constructors and class methods? How to use them?

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 ส.ค. 2020
  • In this video, I'm explaining when, why, and how are constructors and class methods used.
    📚 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/VisualAssistDownload
    (Improves Visual Studio experience by quickly identifying and fixing code errors)
    ☕ 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! ❤️😇
    Introduction to OOP - • C++ OOP - Introduction...
    If you are a beginner in C++, check out my "C++ for beginners" course: • C++ FOR BEGINNERS (202...
    "C++ functions" course:
    • C++ FUNCTIONS (2020) -...
    Follow me on other platforms:
    Instagram 📸 - / truecodebeauty
    Twitter 🐦- / truecodebeauty
    ******INITIAL CODE IS IN THE COMMENTS******
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 328

  • @CodeBeauty
    @CodeBeauty  3 ปีที่แล้ว +38

    📚 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.
    #include
    #include
    using namespace std;
    class TH-camChannel {
    public:
    string Name;
    string OwnerName;
    int SubscribersCount;
    list PublishedVideoTitles;
    };
    int main()
    {
    TH-camChannel ytChannel;
    ytChannel.Name = "CodeBeauty";
    ytChannel.OwnerName = "Saldina";
    ytChannel.SubscribersCount = 1800;
    ytChannel.PublishedVideoTitles = {"C++ for beginners Video 1", "HTML & CSS Video 1", "C++ OOP Video 1"};
    cout

    • @user-ry3uo1qh5n
      @user-ry3uo1qh5n 3 ปีที่แล้ว

      Welcome me 😍 friend.

    • @CodeBeauty
      @CodeBeauty  3 ปีที่แล้ว +1

      @@user-ry3uo1qh5n Hahaha, welcome! 🤗

    • @user-ry3uo1qh5n
      @user-ry3uo1qh5n 3 ปีที่แล้ว

      @@CodeBeauty 🇰🇿

    • @CodeBeauty
      @CodeBeauty  3 ปีที่แล้ว

      Wow, I'm glad to see that people are watching me on the other side of the world! Қош келдіңіз! ☺️

    • @user-ry3uo1qh5n
      @user-ry3uo1qh5n 3 ปีที่แล้ว

      @@CodeBeauty менің TH-cam каналыма үлкен рахмет, мен сізді көргеніме қуаныштымын.🙂

  • @TimelyEnlightenment
    @TimelyEnlightenment ปีที่แล้ว +39

    I've read plenty of c++ ebooks and they are very comprehensible, but your way of explaining class and objects in this video is way more comprehensive. Starting with simple way of creating class and then how you can create multiple classes without having to repeat the same codes. This is better than how I learn it in college. AMAZING 👏

    • @themaskedguy4482
      @themaskedguy4482 4 หลายเดือนก่อน

      Can you suggest some good books

  • @kathrinlahner5620
    @kathrinlahner5620 2 ปีที่แล้ว +59

    Usually, I don't comment...but after three years of programming and finally understanding constructors I want to say THANK YOU🌸- and I mean it!! Your explanations are comprehensible and finally there's a way for me to understand what I'm supposed to do with all that code. Coffee bought☕

    • @CodeBeauty
      @CodeBeauty  2 ปีที่แล้ว +4

      Thank you so much 🥰💞

  • @joyceosas7793
    @joyceosas7793 6 หลายเดือนก่อน +16

    Three years already and your videos are still very useful. God bless you, Saldina

    • @CodeBeauty
      @CodeBeauty  6 หลายเดือนก่อน +5

      🙏💙

  • @WintaRussom
    @WintaRussom 3 ปีที่แล้ว +4

    Thanks a lot! I love your explanation and the way you've used relatable class's name and objects ☺️

  • @StephenElDrago
    @StephenElDrago 3 ปีที่แล้ว +1

    watched five different videos about classes and your video made it all click, thank you. you saved my life

  • @mudmaster9965
    @mudmaster9965 2 ปีที่แล้ว +13

    I am really new with programming. The way you teach by comparing old methods with new one is remarkable !
    It make me understand about why it happened and why it matter
    Thank you

  • @hamzehidris6340
    @hamzehidris6340 2 ปีที่แล้ว

    Thank you very much your videos are very helpful! I stopped go to my classes in uni and instead I'm watching your videos and learning much more!

  • @natnaelhabtamu2799
    @natnaelhabtamu2799 3 ปีที่แล้ว +1

    I just want to say thanks and i just want to let you know that you are making huge difference in many people. love you from ethiopia

  • @raykos4257
    @raykos4257 2 ปีที่แล้ว +2

    Great tutorial! So clear and well paced!!!

  • @yuanyuan23191212
    @yuanyuan23191212 2 ปีที่แล้ว +14

    Thanks Saldina. It would be great if you could also cover destructors, virtual destructors, delete, and related dynamic memory parts when you have time in future.😀

  • @aubreymmotong9550
    @aubreymmotong9550 2 ปีที่แล้ว +2

    i used to dread C++ until i started following this channel. Teaching is a s skill. Thank you so much...

  • @heeDeer
    @heeDeer 2 ปีที่แล้ว

    I dont usually comment on videos but this really helped. Im very new to programming and struggling alot and this video really helped me understand constructors. THANK YOU!

  • @nicolascrespo4643
    @nicolascrespo4643 2 ปีที่แล้ว +1

    Thank you! Much appreciated. This series are great!

  • @phungat6621
    @phungat6621 2 ปีที่แล้ว

    I have to admit that your video is absolutely clear. Thats why I choose to watch your video despite language difference

  • @subratadas9772
    @subratadas9772 2 ปีที่แล้ว +1

    everyone who do such works,give time ,and bring such content is worthy to be appreciated,plz bring data structures too.

  • @melody.-.1839
    @melody.-.1839 3 หลายเดือนก่อน

    Thank you so much for explaining this, my professor in college blew through this and it's immensely helpful to see your examples! Going to watch this whole series of videos

  • @erende44
    @erende44 2 ปีที่แล้ว +1

    best explanation I found so far, thanks!

  • @user-dw2xj7qm2n
    @user-dw2xj7qm2n 2 ปีที่แล้ว

    Very clear && easy to understand, thank you!

  • @abdullahlahore7416
    @abdullahlahore7416 3 หลายเดือนก่อน

    you've made programming looks so easy. More power to you girl.

  • @belloemmanuel4878
    @belloemmanuel4878 4 หลายเดือนก่อน

    I like that you adopt this "show me the problem with something" before you introduce the new concept that was meant to be the solution.

  • @iwankalinow7028
    @iwankalinow7028 3 หลายเดือนก่อน

    Clear and simple. Thanks🌹

  • @utku495
    @utku495 2 ปีที่แล้ว

    Great, comprehensible video! Good job👍

  • @ib_parametres724
    @ib_parametres724 ปีที่แล้ว +1

    Nice explanation of the concept with example, thanks.

  • @asandro78
    @asandro78 2 หลายเดือนก่อน

    Finally, after some weeks in classroom I am able to get the concepts of OOP. Good work, Salina. Keep going on with more and more videos, sharinh knowledge.

  • @thiagoantunes892
    @thiagoantunes892 3 ปีที่แล้ว +6

    I understood 100%. Now I see the meaning of the constructors. *Thank you so much, Saldina.*

    • @CodeBeauty
      @CodeBeauty  3 ปีที่แล้ว +2

      Great! I'm happy to help 🤗

  • @roberte.o.speedwagon114
    @roberte.o.speedwagon114 2 ปีที่แล้ว

    Aaaaa taj naglasak mogu prepoznati u snu. Inace odlicni snimci i nadam se da ces nastaviti sa njima od mene samo reci hvale i podrske

  • @leythecg
    @leythecg 9 หลายเดือนก่อน +1

    Great tutorial! Many thanks!

  • @CesarAugustoRL
    @CesarAugustoRL 3 ปีที่แล้ว

    You are an excellent teacher, thank you very much!

  • @kiniwetin2144
    @kiniwetin2144 2 ปีที่แล้ว

    Thank you for the awesome videos and contents. Since I learn a lot through commenting code lines; I am pleading that you include the comments for learners like me. Thank you for the great work!!!!!!

  • @miaflorida9410
    @miaflorida9410 5 หลายเดือนก่อน

    I really wanna thank you because i am really struggling with C++ and your instructions are so clear and your verbalism, the way you talk is also great and understandable. All these coding videos there's always some guy who is indian and speaking with a terrible accent so i can't really understand from them sometimes (english is my second language) you saved me really! subscribed

  • @bushraw66
    @bushraw66 2 ปีที่แล้ว

    that is exactly what I was looking for, very helpful. thank you so much

  • @user-zj9pq5xc7x
    @user-zj9pq5xc7x 11 หลายเดือนก่อน +1

    excellently explained. thank you!!

  • @yifeiren8632
    @yifeiren8632 2 ปีที่แล้ว

    Your videos are really helpful! Thanks a lot!!

  • @user-vw9mp3xn6m
    @user-vw9mp3xn6m ปีที่แล้ว

    Thank you for this video, I think you understand where I am having difficulties better than any other coding channel so I always look for your videos first now haha

  • @mexxiano
    @mexxiano 3 ปีที่แล้ว

    There is hundreds of favourits songs... but you inspired me to one special: Passengers - Miss Sarajevo (Concert Version). Thank you for your time! It's a pleasure to see yours videos. Very clear. Very usefull. Very beuty code to code beauty. Regards from Argentina!

  • @madalinavarga3337
    @madalinavarga3337 3 ปีที่แล้ว

    Hi! Amazing tutorials,i watched only two ,for the moment, and i really like its.

  • @WestCoastWanderer
    @WestCoastWanderer 3 ปีที่แล้ว +3

    Just stumbled on your site Saldina. Great to see so many C++ videos! Thanks for producing these. :) Looking forward to checking more of these!

    • @CodeBeauty
      @CodeBeauty  3 ปีที่แล้ว +3

      C++ has a special place in my heart, so I decided to start my channel with C++ tutorials ☺️

    • @WestCoastWanderer
      @WestCoastWanderer 3 ปีที่แล้ว

      @@CodeBeauty lol I can tell you're passionate about it. I have been reluctant to dive in since I'm dreading learning about pointers but hopefully you will cover that section soon :)

  • @stephenjames5745
    @stephenjames5745 3 ปีที่แล้ว +5

    This series is terrific! Thank you.

  • @eminbaybarstimurstudent3802
    @eminbaybarstimurstudent3802 3 ปีที่แล้ว

    Such a great video. It was a great practice.

  • @DiamondDavid55
    @DiamondDavid55 2 ปีที่แล้ว

    Appreciate your work. easy to understand

  • @zainatta7544
    @zainatta7544 4 หลายเดือนก่อน

    Thank you so much. I finally understand constructors

  • @leonardopantoja7121
    @leonardopantoja7121 หลายเดือนก่อน

    Te felicito por tu Canal. Explicas muy bien. Voy a hacer todo el curso. Espero aprender todo. GRACIAS.

  • @diogopocas7943
    @diogopocas7943 11 หลายเดือนก่อน

    Thank you so much. I had so much trouble understanding this in class

  • @namoralthy1067
    @namoralthy1067 2 ปีที่แล้ว

    What a great video!
    Your explanation is very good

  • @Unikv
    @Unikv 3 ปีที่แล้ว +2

    Thanks a lot. Question, i'm looking to make a counter for every object listed, but i don't wanna use global variables. How would you recommend to do this? Great video as always :)

  • @sammy949
    @sammy949 2 ปีที่แล้ว

    Thanks a lot! Your example choose very good.

  • @jianhe
    @jianhe 2 ปีที่แล้ว

    you explained why very well. Thanks.

  • @Digitaltruths
    @Digitaltruths 11 หลายเดือนก่อน

    I do wish the volume was a little louder on a cpl of videos, each time a commercial comes on its so loud lol! Totally worth it tho, these videos are rad! Imho

  • @carlasanchez4349
    @carlasanchez4349 ปีที่แล้ว

    Really clear video - thank you

  • @user-ny8hh7vc7h
    @user-ny8hh7vc7h 2 หลายเดือนก่อน +1

    You are indeed the software developer keep it up!!!!

  • @clakker9412
    @clakker9412 ปีที่แล้ว +1

    I love you so much really thankkk you!!!!!!!!!!!!!!!!! finally i found someone who teaches really REALLY WELLLL

  • @mayureshharihar2557
    @mayureshharihar2557 2 ปีที่แล้ว +1

    Feeling very lucky after found this channel 😇

  • @mikegenco9646
    @mikegenco9646 ปีที่แล้ว +1

    One of my favorite songs is Baker Street by Gerry Rafferty. A side note on terminology, I have heard the different arguments in an overloaded function called the function's signature.

  • @athanusri8337
    @athanusri8337 ปีที่แล้ว

    miss saldina.. you made my day .. thank u so much

  • @alexjulius69
    @alexjulius69 2 ปีที่แล้ว

    Thanks, explained perfectly

  • @palani313
    @palani313 3 ปีที่แล้ว +1

    Clear explanation, pls do more videos in c++

  • @erenjaeger__1
    @erenjaeger__1 ปีที่แล้ว +1

    THANK U MAM 🙇‍♀️
    LOVE FROM INDIA❤️

  • @rudradev3873
    @rudradev3873 2 ปีที่แล้ว +6

    Thank you so much for these gems. Helps me to become exponentially better in programming, maybe I'll top my branch this semester.

    • @CodeBeauty
      @CodeBeauty  2 ปีที่แล้ว +3

      Wow, good luck, I'm so glad to hear that top level students are learning from my channel 😃😃

  • @shubhanshsingh
    @shubhanshsingh ปีที่แล้ว

    Brilliant, Excellent, thanks so so muchh !!!!

  • @Farjanamoon-no7ok
    @Farjanamoon-no7ok ปีที่แล้ว +1

    you are really a great tutor

  • @leonraicevic1360
    @leonraicevic1360 ปีที่แล้ว

    Thank you, great videos! My two fav songs will be Fleetwood Mac - Dreams and ofc The Hooters - Johnny B!

  • @luisortega5636
    @luisortega5636 3 ปีที่แล้ว

    Beautiful! My favorite song is Time from Pink Floyd! Great Video!

  • @kingbubbles4509
    @kingbubbles4509 2 ปีที่แล้ว

    thank you for this very helpful video

  • @harshitkhanna1918
    @harshitkhanna1918 2 ปีที่แล้ว +1

    U just got a sub great job explaining ☺️

  • @7401kb
    @7401kb 2 ปีที่แล้ว +1

    I appreciate the way of teaching and great hardwork to prepare such a perfect videos. Excellent work by CodeBeauty!

  • @manlupiano1431
    @manlupiano1431 3 ปีที่แล้ว

    Excellent explanation

  • @261-monishg2
    @261-monishg2 ปีที่แล้ว

    after lot of vedios and finally found the perfect one!!!!!

  • @anhhuynh1360
    @anhhuynh1360 3 ปีที่แล้ว

    Thank you so much! Please make more videos like this :)))

  • @yasirfazli6083
    @yasirfazli6083 2 ปีที่แล้ว

    Wow great keep it up
    I really love your videos

  • @gagef4101
    @gagef4101 ปีที่แล้ว +1

    Little late but my favorite song is Beast of Burden by The Rolling Stones. Thanks for your videos!

  • @ahmedyoko9314
    @ahmedyoko9314 3 ปีที่แล้ว

    Excellent, thanks

  • @ashenhewavithana9479
    @ashenhewavithana9479 2 ปีที่แล้ว +1

    Fav songs, wind of change - scorpions, creep - radiohead, every breath you take - the police, drops of jupiter - train.

  • @michelmoncada22
    @michelmoncada22 ปีที่แล้ว +1

    my TA recommended you THank you Belen and thank you it was really helpful

  • @Nussrat02
    @Nussrat02 3 ปีที่แล้ว +1

    Flipsyde - one more trip
    The guitar solo 😍😍

  • @rumildaolik4905
    @rumildaolik4905 3 ปีที่แล้ว +1

    thanks for the explanation :-)

  • @liquidred257
    @liquidred257 3 ปีที่แล้ว +2

    Is there an advantage to using "list" instead of perse "PublishedVideoTitles string[100]" (so I guess an array)?
    Also I really like rainbow in the dark by Dio

  • @huichitonft
    @huichitonft ปีที่แล้ว

    awesome vid!

  • @mateoslab
    @mateoslab 2 ปีที่แล้ว

    Hi CodeBeauty! Don't you need to initialize the list in the constructor somehow? I thought you would get an error if at least one attribute is not initialized?

  • @gaborm4767
    @gaborm4767 ปีที่แล้ว

    It would be nice to show how we can use a class from different translation units. How to write header file and cpp file in this case.

  • @ashrsfsiliman452
    @ashrsfsiliman452 3 ปีที่แล้ว +1

    Thank you for your great job

  • @Zabi281
    @Zabi281 10 หลายเดือนก่อน

    Very good video 📸 deserve likes and subscription.

  • @jasnarmstrng
    @jasnarmstrng ปีที่แล้ว +1

    So far, so good 🙂
    ...
    Song: Where I am - Freetown Collective.

  • @PrasadPatil-eg1lo
    @PrasadPatil-eg1lo 2 ปีที่แล้ว +1

    Woah its great thnx saldina✌🏻

  • @elsafernandatorresferia886
    @elsafernandatorresferia886 3 ปีที่แล้ว

    Thanks for the videos from México!
    Quick question: A class method is like a function inside a class?

  • @ziam4393
    @ziam4393 3 ปีที่แล้ว +1

    What can I say other than my jaws only dropped in amazement at how you easily delivered this.

  • @1conscience0dimension
    @1conscience0dimension 3 ปีที่แล้ว +1

    really a great video well structured. you have a great future but don't believe the hype

  • @forlearning2223
    @forlearning2223 11 หลายเดือนก่อน

    fantastic!!

  • @salahhoraichi9618
    @salahhoraichi9618 3 ปีที่แล้ว

    Good thank you.i follow you from italy

  • @loool87871
    @loool87871 2 ปีที่แล้ว

    Great, thanks for your videos and efforts, I have a question, at 7:22 you said that in case of declaring new object from the class we have to give it some parameters like Name, ...., so what shall be done just to declare a new object, before knowing anything about it, just like int x, is there something for that?, Many thanks in advance

  • @ankursingh9214
    @ankursingh9214 2 ปีที่แล้ว +1

    Thank you my new mam for teaching c++ in very simple and easy way.
    I am from India .so, Language becomes more barrier for me but in your case I didn't feel like this
    due to your easy way of teaching and making the things related us by giving perfect example
    once again Thank you so must...

  • @anandks364
    @anandks364 2 ปีที่แล้ว

    great content ;

  • @AdrianMac
    @AdrianMac 3 ปีที่แล้ว

    Hello Saldina! (I hope I spelled your name right)
    I want to say I appreciate all your videos and please DON'T stop! Do you have a video on overloaded operators?

  • @limelemonada
    @limelemonada หลายเดือนก่อน

    A literal lifesaver

    • @CodeBeauty
      @CodeBeauty  หลายเดือนก่อน

      🥰🥰

  • @legolas5684
    @legolas5684 3 ปีที่แล้ว

    Very nice!!!!

  • @cipherland8889
    @cipherland8889 3 ปีที่แล้ว

    Thank you!!

  • @krishna_3406
    @krishna_3406 2 หลายเดือนก่อน

    you should deserve more subscribers ☺

  • @MatthewJohnson-yc7nx
    @MatthewJohnson-yc7nx 2 ปีที่แล้ว +1

    I appreciate your hardwork to make these videos at 3am.
    I have had more success with your videos gaining practice and understanding foreign concepts.

  • @firstlylast5890
    @firstlylast5890 4 หลายเดือนก่อน

    understood, but, a light theme, really!

  • @mceucalyptuzkz
    @mceucalyptuzkz ปีที่แล้ว +1

    thank you, My favorite song is Mathematik - Insersion Of Thought