C++ Structures for beginners (explained in 30 minutes) + Test your programming knowledge!

Поділитися
Вставка
  • Опубліковано 7 лип 2024
  • 📚 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.
    In this video, I'm explaining C++ structures for beginners. Structures are user-defined data types. They are used to represent information about something more complicated than a single number, character, array of numbers, characters, etc. So, you can use a structure to represent information about a Person, an Animal, a Sport, a Game, a Car...
    In this 30-minute programming tutorial, you will learn what are structures in programming, how to create structures, why to use them, how to create variables of the struct type.
    All of these topics are covered in the "Introduction to structures" part of this video.
    You'll also learn how to use structures and functions and how to pass a structure as a parameter to a function.
    In the final part of the video, I'll show you what are nested structures and how to use structure inside another structure
    In the end, you can find a task that you can use to test your programming knowledge, together with some useful tips.
    In the description, you can also find videos that can help you to solve the programming test.
    ☕ 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. Use the link 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! ❤️😇
    Contents:
    00:00 - Intro
    01:08 - Introduction to C++ structures for beginners
    15:28 - C++ structures and functions
    20:38 - Nested structures, How to use struct inside another struct
    27:05 - Test your programming knowledge!
    29:29 - Review of the program that you should build
    31:42 - Tips to solve the programming test
    34:04 - Suggestions to upgrade the program
    Videos that can help you to solve the programming test:
    For loop - • C++ FOR BEGINNERS (202...
    Nested do while and for loops - • C++ FOR BEGINNERS (202...
    Nested for loop 1 - • C++ FOR BEGINNERS (202...
    Nested for loop 2 - • C++ FOR BEGINNERS (202...
    Arrays - • DATA STRUCTURES - How ...
    Related videos:
    Basic Data Types in C++ - • C++ FOR BEGINNERS (202...
    Functions playlist - • C++ functions
    Add me on:
    Instagram 📸 - / truecodebeauty
    Twitter 🐦- / truecodebeauty
  • Наука та технологія

КОМЕНТАРІ • 622

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

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

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

      Hi Saldina!
      How do structures compare to classes?

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

      definitely, you are a very good teacher.

  • @manuelalejandrohernandezma9317
    @manuelalejandrohernandezma9317 3 роки тому +18

    My God, you´re like an angel that came to teach us C++! Thank you so much!

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

    I am actually writing an ORM to abstract my SQL statements. One of the thing I did was create a way to map my C structures into the ORM like a virtual structure. Heavy use of pointers to the structure elements was used and became very helpful in the abstraction.

  • @SpoonerBlackWolf
    @SpoonerBlackWolf 2 роки тому +46

    #include
    using std::cout;
    using std::cin;
    using std::string;
    using std::endl;
    struct Question{ // ** Struct with question + 3 answer and a int for the correct choice **
    string questionText;
    string answer[3];
    int correctAnswer= NULL;
    };
    bool correctAnswer(int correct) { // ** ask and check if the answer is correct or not with a bool **
    int answer;
    cout > answer;
    while (answer > 3 || answer < 1) { // Check if the user enter a not valid number
    cout > answer;
    }
    if (answer == correct) { // check if the answer is correct
    cout

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

      thanks! I learned a lot about function-bool-struct features from this one.

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

      Just use ''using namespace std;'' at this poiint lol

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

      Good but you could have used structure array

    • @nithilana
      @nithilana Рік тому +6

      Nice. But structure array will reduce the redundant lines of your code. Try using that. Here is my code for reference.
      #include
      using namespace std;
      int score;
      struct Quiz{
      string question;
      int answer;
      };
      struct Options{
      string option1;
      string option2;
      string option3;
      };
      void results(Quiz *questions,Options *options){
      for(unsigned int i=0;i

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

      If I were you, instead of writing (or coding) "question1", ..., "question5", I would have code an array of questions for 5 elements, and thus your code could be more compact.

  • @The.gm63
    @The.gm63 3 роки тому +104

    please post c++ algorithms and data structures full course. thanks

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

      There are books describing this subject. If you don't want to read books use those from the STL.

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

      @@TheJaniczek what books do you recommend ?

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

      @@simaobonvalot9141 it depends what you need. K.Sayood Data Compression, Adam Drozdek Data structures and algorithms I have this one in Polish and his book also on data compression. Any book by Robert Sedgewick with C or C++ on algorithms is also very good. Cheers.

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

      @@TheJaniczek I was thinking about a book with solid foundations about C / C++ . In English or portuguese preferably..

  • @SA-oj3bo
    @SA-oj3bo 2 роки тому +5

    I was wondering when to use a struct and when to use classes + objects. 2) I think it is always good to show the teacher's solution so we can compare it with ours! Thx for nice tutorials..

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

    I love C++! I'll give it a try to the quiz app this weekend on my free time. Thanks Saldina, you have helped me a lot!

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

    Saldina, I enjoy studying C/Cpp and I absolutely appreciate you videos!

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

    Hello Saldina, I am learning to code in order to create a trading robot in Metatrader 5. I find your teaching moves along nicely. Thank you for doing these C++ lessons.

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

    Thank you, I think nobody explains anything better than you do. You are great!!!

  • @peter2611
    @peter2611 3 роки тому +37

    You are amazing, but you forgot to answer the most important question of all - what is the difference between a struct and a class... the answer is:
    The only difference between a struct and class in C++ is the default accessibility of member variables and methods. In a struct they are public; in a class they are private (at least per my understanding).

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

      Most programming classes or structured college courses teach to always specify access modifiers explicitly in your code anyways, which somewhat makes the point moot to people with formal classes. But for beginners who do not take formal classes, you do have a point.

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

      thanks. i was surely wondering

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

      1) Well you can not have methods/functions inside a structure.
      2) Structur is used for small stuff and class is used for big stuff
      3) In struct members are public by default whereas in class they are private by default.

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

      @@yashsonawane905 Structs can be large and complex. Remember, they existed before the concept of classes came to be. Which is why you rarely pass a large struct to a function by value, but rather a pointer to the struct.

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

      Structures are stored in stack memory while classes use heap memory. A major difference which tells us about the time complexity and memory complexity.

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

    Namaste Saldina! Your teaching approach is so cool.
    Gotta tell you, this is the best c++ channel.
    keep up the good work.

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

    These are excellent courses that I am using as a refresher as I mostly use C for embedded code but love C++.

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

    这是我在最近一个周以来,看您的第21个视频了;我从未见过如此优秀低调的老师!谢谢您!

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

    Another very good tutorial! Thanks!

  • @zaeshanvlogs3746
    @zaeshanvlogs3746 3 роки тому +9

    Youre teaching method is excellent, you deserve wayyyyy more views. Dont stop, youll go wayy big some day!

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

    I am working on my MSCS and your videos greatly help me

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

    Excellent video.
    The output (cout) examples tied everything together; clean, succinct and paced very well with focused instruction and description (treatment).

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

    Nice presentation! One thing I would ad is the use of arrays of structures so the same structure can be used repeatedly to store different values of the same type.

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

    What a great and amazing definition!!!
    Thank you very much 🤗🤗🤗

  • @Atom-ji1ot
    @Atom-ji1ot 3 роки тому +8

    What a good explanation.

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

    Programming is fascinating it can make our life more easier I'm lazy and hate doing things on repeat

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

    Officially subscribed. I'm currently learning C++ and your videos, alongside all my C++ books and Udemy course is helping me a lot. Thank you for your quality content. Also, you're gorgeous!

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

    You make learning C++ easy for me thank you

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

    Just came across this video....your explanation and demonstration is unique. this is the most easy to understand struct video i have ever come across . thanks so much for this video.

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

    Awesome! I was looking for this! Thanks beauty.

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

    Slowly gaining momentum in c++ with you only.. A big biggggg thanx.. As i am getting into embedded tech, ur c++ giving me boost.

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

      @sekharathome Can you guide me on how to get started with embedded tech? I am an ECE student.

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

    A clear and concise explanation. Thank you.

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

    thank you for your excellent videos you're a great teacher i'm learning computer engineering at the university but in your vedeos you explain these topics better than my proffs in the university they are easier to underestand thank you so much❤😍

  • @tushargoutam3180
    @tushargoutam3180 3 роки тому +14

    Mam I have a request .Can You Please make a tutorial on "File and Exception handling " in c++

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

    Hello Code Beauty. Great to see a fellow developer on the platform. Keep up the good work.

  • @patrpatl
    @patrpatl 5 місяців тому +2

    This teacher really wants a lot of comments and likes and shares.
    Lets give her it.
    Thank you for the free tutorial.

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

      I do, that way my tutorials will reach and teach more people 😁 thank you 🥰

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

      So take my comment as well then.

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

    You're the best modern c++ teacher in UA-cam University

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

    Great explanation! My interest in coding is being developed by watching your videos and by practicing them. Thanks a lot

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

    I first like before listening to the course. Thank you!!!

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

    Excellent tutorial. Keep up the good work.

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

    This must be the best channel for C++

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

    definitely, you are a very good teacher.

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

    really loved your teaching style

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

    Very cool! Perfect! Thanks.

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

    I enjoyed the upload and won’t be able to attempt the homework soon. Will progress your videos in order so I’ll be coming back to it.

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

    Your tutorial is really helpful for me. Amazing

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

    The iPhone 12 starts at $799 + Storage capacity.
    Storage capacity options: 64 GB , 128 GB and 256 GB.
    The Samsung Galaxy S21 Ultra starts at $1.299 + Storage capacity.
    Storage capacity options: 128 GB , 256 GB and 512 GB.
    The more storage you want, the more it costs.
    Thank you very much for the videos that you upload. They really help me to switch from Java and C to C++.

  • @salihbarknakkaya8101
    @salihbarknakkaya8101 3 місяці тому +1

    For last 5 day I am just searching out your channel and you even write a comment to me this morning. It is finally feeling me like "I CAN UNDERSTAND!" thanks for everything, you are the best teacher ever!

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

      I'm happy that you're here and learning 😊

  • @milanrai1556
    @milanrai1556 Місяць тому +1

    I love the way you said "Like this" at the end. Learning a lot ma'am 🤘🤘

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

    The best explanation ever!!!!! Thank you .

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

    You should do a video about c++ applications in real world , it will be so interesting your perspective!

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

    Congratulations for getting 63.1K subscribers, keep going on

  • @user-uz6pe9sf9o
    @user-uz6pe9sf9o 7 місяців тому +2

    amazing presentation. You just make coding easy and fun!

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

    Merci ! Excellent tuto.

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

    ma'am please make videos on Data Structures & solution of this quiz problem. Ma'am really love your way of teaching. Just keep going.❤ You are the only one who focus more on foundation. Thank you ma'am.

  • @pg.idrees
    @pg.idrees 3 роки тому +7

    I can't believe that u r back 😊😊

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

      Back to stay 🤗💗💗

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

    Thank you Saldina! 💖

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

    Nicely done!

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

    thank you it will be very useful for who want to learn classes in c++

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

    Thank you so much..... Your content is really Fricking cool❗❗
    Congratulations for the 30K subs, u surely deserve more....keep making 😊💯

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

      Thank you so much! I'm very happy and grateful for every single person who watches and likes my videos! 🤗🧡🧡

  • @johnlaidlaw5724
    @johnlaidlaw5724 Рік тому +2

    Love your videos! You do an excellent job! Thank you!

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

    Hey! Could you do an Introduction to Data Structures tutorial please?
    Great video!

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

    Congrats for 35k followers and keep going ahead

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

    Hello saldina,
    Your videos are so helpful for us. I stop watching other videos on c++, your videos are more than enough for me.
    Also sharing your videos with my friends to help reach 1M subscriber soon.😊😊

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

      Thank you so much! You are helping to teach other people by sharing! That is so generous and nice of you!🙏💙

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

    Thanks for sharing.

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

    I like learning more c++ programming. Thank you...

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

    I have seen a few of your UA-cam videos on C++ and found them very well presented, easy to follow and informative in detail. However, on this occasion I found this to be a bit difficult to follow; seemingly a ramble through the process, lacking in explanatory detail. But, in the end, I had learned little. Nevertheless thanks for the stunning effort. Thanks.

  • @AzeemKhan-sr4my
    @AzeemKhan-sr4my 3 роки тому +2

    Plz share the solution and upload videos twice a week plz.... They helped us a lot

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

    Yes!!!!!!!!!!!!!!!!!! Make a video we go through it and also add one more example in that video showing how we can store the structures in case we are making lets say a project on cars...whereby at the end we will need to output a kind of form for all cars. Thank Youuuuuu

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

    Very good and useful video...Task to test our knowledge is the best portion here....it would be good if u can provide the test after each video....

  • @andyvarella6336
    @andyvarella6336 5 місяців тому +1

    Easy to understand explanation of structures. Thanks CodeBeauty.

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

    Salina please do vectors; and how they interact with objects and pointers.

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

    wow !!! thanks for the exercise, it wasn't easy for me but I did it :) at least it works,
    I don't know if the path taken is the right one but it's already a satisfaction
    tanks again.

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

    One thing i have learned is not to use single letter variables. The reason is that it is sooo tedious to search for a single-letter variable in a larger program.
    Just using 'ps' as 'person' instead of 'p' can save you from a lot of grief.
    Loop-Iteration-vars like 'i' is an exception, from that recommendation.

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

      I guess this depends on the fact if its a local variable or a global variable

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

    Thank so much. These videos are really helpful

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

    I didn't understand that part where you said create a structure for answers as well but this is how I did it. I hope it's fine this way as well. It's working completely fine. Please check it out. #include
    #include
    struct Question
    {
    std::string Questiontext;
    std::string options[3];
    int Correctanswer;
    };
    int main()
    {
    Question question[3];
    question[0] = {
    "What's your favorite animal?",
    {"Dog", "Cat", "Rabbit"},
    2};
    question[1] = {
    "What is your favorite show?",
    {"Drake & Josh", "BTR", "iCarly"},
    1};
    question[2] = {
    "What is your favorite color?",
    {"blue", "green", "red"},
    1};
    for (int i = 0; i

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

      thanks

    • @andewprod
      @andewprod 4 місяці тому +1

      oh wow that was exactly what i was searching for! Your code is short and sweet! Questions are rather funny lol.

    • @sinno2861
      @sinno2861 4 місяці тому

      @@andewprod haha thanks! I'm glad it helped.

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

    Your explanation is very wonderful, I loved it and benefited a lot from it
    But i have question ,
    What's different between structure and Class

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

      Thanks! Structure members are public by default, and class members are private 🤗🤗

  • @test160
    @test160 4 місяці тому

    best video ever !!!!!!!!!!!!!1 rarely ppl do functions use them in the argument they just spoke of.

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

    Hi Saldina. I did it with structures and I used a do while loop instead of nesting. It works fine. You are a great teacher. I had trouble passing the array references into the structure so I had to set the arrays manually. Did you use pointers in yours.?

  • @md.yousufali4698
    @md.yousufali4698 2 роки тому

    QuizApplication is done, Form Bangladesh. I follow your C++ videos. Thanks

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

    Your approach is very good. I'd recommend your videos to beginners learning C++. I wish I had sources like this when I learned C++ 25 years ago. BTW, in my experience C++ sucks and I reverted to good ol` C, but that's a topic for another conversation.

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

      why didn't cpp workout for you?

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

      ​@@agirlindenial8752 c++ does not work for native english speakers

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

    I did the test! By the way, may you one day after finishing the C++ tutorial make a tutorial for C++ windows application? Is really hard.

  • @daneddieloayon2701
    @daneddieloayon2701 Рік тому +2

    So much better than my professor 🥰😍

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

    Thank you so much !!

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

    I would love to see a video on the quiz

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

    Such a beautiful voice thanks for the helpful content !!!

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

    Excellent video. May thanks.

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

    My answer to that question is there's no way I'm paying anything close to those prices for a phone, and I still wouldn't if I was a millionaire. Another great tutorial, as usual. Thank you.

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

    thank you, i'm going well with your course now.
    thanks for the quiz,but it will take me at least a month ,bcz i'm so young in your course.

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

      That is fine, just keep working a little bit every day. 🤗
      Good luck! 🤞🤞

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

    Nice one... keep doing the good work

  • @JordanCassady
    @JordanCassady Місяць тому +4

    In 2024 the iPhone 12 costs about $800

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

    Great explanation

  • @aphelmusonda5253
    @aphelmusonda5253 Рік тому +2

    you're strong 💪 thank you

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

      You're brave! Thanks 😃🤗

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

    Ma'am please make a series on DS & Algo :)

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

    Your explanation is very good. Thanks ❤

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

    Hii your lectures clear all my concepts thanks

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

    You explain things in great detail which is appreciated. What determines if you should use a struct or a class?

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

      Although at the first sight they appear almost the same they function differently
      At the base struct is a data type. Think of it as a special array with key value pair . Note that in C++ you can have methods in a struct. Class is not a data type.
      The first difference you will see is in a struct the data are by default public but data of a class are private. There are some differences in memory allocation.
      Use struct when you have a bunch of data that act like they stick together. As an example. Student as a struct. (Name grade major)
      Use a class when you have to do something more. Some computation or you need encapsulation of the data.
      Struct in C++ are kept to be backward compatible with C. ( that's just my opinion. You can write C style in C++ but that defeats the purpose of writing C++ code)
      But you can find use for them even if you write OOP like code.

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

    Thank You!

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

    finally a good review

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

    WONDERFULL EXPRESSION 🙏🙏🙏

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

    Thank you so much very helpful

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

    its funny how my lectures completed C++ course in 2 years but I never came across Structures even today I don't know how to code a binary tree with Genuine Understanding I follow tutorials with Classes (OOP) Prior Knowledge...but I appreciate your content Miss/Mrs though I came late to the party am lucky that they don't have expiry date haa lol ❤️😜

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

    love tha way you teach mam.

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

    Hi Saldina,well done for this vedio❤