Public And Private Access Specifiers | C++ Tutorial

แชร์
ฝัง
  • เผยแพร่เมื่อ 21 ก.ย. 2024

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

  • @maxg4958
    @maxg4958 4 หลายเดือนก่อน +9

    Dang, your courses are so underrated, yet so helpful... and today's views of 31k is not matched by lousy 876 likes. C'mon people, don't just watch, pay your dues and hit the like button for these no fuzz and straight to the point tutorials.

  • @mkk9211
    @mkk9211 ปีที่แล้ว +12

    i have 3 hours to my final exam. your channel has helped me a lot so far, thank you ❤️
    ps: text based AI LMs still can't explain topics better than humans

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

      You're very welcome, I'm so glad to hear the channel helped you out! :-) And I'm glad to hear humans are still winning the race against the machines, at least for now. :-P

    • @ecmuppet9538
      @ecmuppet9538 4 หลายเดือนก่อน +1

      How did the final exam go?

  • @suvojitdas2240
    @suvojitdas2240 ปีที่แล้ว +8

    Omg...Sir thank you for helping me out of this topic......You actually saved me and cleared all my doubts....A new sub .....Thanks Sir

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

      You're welcome, I'm glad that the video helped you out! :-) And welcome aboard!

  • @GabrielVillanueva-uw2sj
    @GabrielVillanueva-uw2sj 3 หลายเดือนก่อน

    Brilliant explanation! This video took 8 mins to explain something I struggled to understand!

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

    7:07 this is all I needed to know.
    I missed the lecture a few days ago and this helped alot, so thanks ;)

  • @chaoukimachreki6422
    @chaoukimachreki6422 7 หลายเดือนก่อน +2

    Well explained, but i would add why do we even use it ? In which cases ? Why just not use const if i am intending not to make changes in it ? Real world reasons why i would choose to make some functions or variables private.

  • @ab-fm4xj
    @ab-fm4xj 7 หลายเดือนก่อน

    can i just say: fck me. finally someone explaining it well. i am follwoing many c++ tutor and i dropped the ball with all their explanation. especially because fk knows why they are using nonsensical variable and class names when it is crutial to be clean and straightforward when one is just learning a new skill. so thank you for that. i am superglad i found this channel.

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

    Thank you for all of your helpful videos. Also would like to say its nice to find a Canadian creator -- (if you are canadian! I have a similar accent). Keep doing what you're doing and thanks again.

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

      You're welcome, I'm glad you find them helpful! :-) And haha yes, I'm Canadian. That's funny that you could tell by the accent, I never really think of myself as having an accent but I suppose we all do.

  • @Sana-y8m5p
    @Sana-y8m5p 4 หลายเดือนก่อน

    you are amazing in teaching and explaining are you sure you are not a teacher?
    thank you very much.

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

    Through but simple and to the point subscribed

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

    Great video, well done.

  • @sonukumarnirala6896
    @sonukumarnirala6896 6 หลายเดือนก่อน +1

    Very helpful your lecture. Thanks

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

    betta than tha lecture I attended
    much love and thanks to you

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

      Haha I'm glad to hear it helped you, and you're welcome! 😀

  • @rjoshi.5182
    @rjoshi.5182 2 ปีที่แล้ว +1

    Great video!!

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

      Thank you for the kind feedback Rjoshi! 😀

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

    Hi! Thank you for the lecture !!

  • @MilosMoravec-jg4dn
    @MilosMoravec-jg4dn 6 หลายเดือนก่อน

    Is class and struct the same thing in C++? Also, do you plan on recording any videos for OOP?

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

    Thanks Masbro

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

    I have difficulties understanding the need for getters and setters, because if you can access it anyway in the public section then it (for me) seems exactly the same as simply just having the salary in the public section? How can this method be more secure if you can set salary and get salary from public? 4:20

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

      The idea is that getters and setters can do things with the data before getting and setting. So maybe before setting a value, the setter can ensure the value is within a valid range. And maybe before returning the data, the getter can convert the format of the data. The exact usefulness of getters and setters is something that is debated by people though, so you're right to question it. :-)

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

    Excellent 👌

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

      Thank you Aman! I’m glad to hear you enjoyed the video. :-)

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

    How can I access data member of parent class inside a child class

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

    What software were you using for writing and executing the codes, sir? Can you share the download link with me please?

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

      In this video I am using Xcode, which is available free on a Mac: developer.apple.com/xcode/. On Windows, Visual Studio is pretty good: th-cam.com/video/qWPlRubVQ38/w-d-xo.html. :-D

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

      @@PortfolioCourses Thank you so much, Sir... I really appreciate your help..

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

      No problem, and you’re welcome! :-)

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

    thank you so much sir...

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

    Great!

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

    thx

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

    So for every private it needs something in the public to run?

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

      Great question Caleb! :-) If we want to give access to private members, we can use public members to do so, but it’s not a requirement that we do this. Sometimes it’s useful to have members that are private without giving access to them through public members, for things the class needs to use “internally” but not expose to the “outside world”.

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

      @@PortfolioCourses I see thanks for the fast reply!

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

      You’re welcome! :-)

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

    sir what is the name of the compilar?

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

      In this video I am using Xcode on a Mac computer. :-)

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

      ​@@PortfolioCourses Sir can i download it on laptop? if yes then can you please let me know how to download it?

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

      You need a Mac to use Xcode, the page for it is here: developer.apple.com/xcode/. :-)

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

    dose a class has no scope?

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

      Great question Akash! This answer here talks about classes and scopes: stackoverflow.com/questions/55092387/what-is-the-scope-of-a-class-declaration-in-c. :-) If you want to learn more about namespaces they are covered in this video here: th-cam.com/video/0EtnWcRild4/w-d-xo.html.

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

    There is no question to be asked.

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

    What ide do you use?

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

      I use Xcode on a Mac. :-)

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

      @@PortfolioCourses can I get it on Windows?

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

      I don't think so. On Windows people often use Visual Studio for C++: th-cam.com/video/qWPlRubVQ38/w-d-xo.html. :-)

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

    What are u using to code? 🤔

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

      Btw great video, gonna have an exam right now and it saved me

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

      In this video I'm using Xcode on Mac. I have it setup so that really only a large code window displays, the default setup doesn't look like this.

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

      I’m glad to hear it was helpful for you, and good luck on your exam! :-)

  • @ABYSSOPELAGIC-m4p
    @ABYSSOPELAGIC-m4p 3 หลายเดือนก่อน +1

    This IDE software so beautiful, Can I know this software which you use to program