Access Specifiers in Inheritance with Example | Public - Protected - Private | OOPs in C++

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 75

  • @SimpleSnippets
    @SimpleSnippets  5 років тому +16

    Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      @@ksriya6807 over all the syllabus won't change much. Check my C++ tutorials playlist 🤟

    • @rtjain1444
      @rtjain1444 5 років тому

      @@SimpleSnippets binary file handling??

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

      I know im asking the wrong place but does someone know of a trick to get back into an instagram account?
      I stupidly lost my password. I would love any tips you can give me!

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

    You've taught me something in 15 min video that my lecturer could not explain clearly in a 3 hour lecture. Thank you!

  • @santoshbiradar9517
    @santoshbiradar9517 4 роки тому +10

    I feel proud when you get wonderful feedback from people residing in other countries...Sir you doing a very great job.

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +2

      Thank you so much Santosh. Even I am proud of you and our fellow indians who have supported this channel to make it a global channel. Please keep sharing the channel. Thats the biggest support ✌

    • @azisagantal320
      @azisagantal320 4 роки тому +4

      @@SimpleSnippets Bro, Indians are the best when it comes to tutorials. I am from the Philippines, many students here in our country who study programming always try to find tutorials like this. Also bro, you are amazing in making tutorial videos. There is not a single video from you that I did not understand. As a gratitude, I always try to share your channel with my friends.

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +4

      Thank you bro for such wonderful compliment ❤️ lots of love from India 😊

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

    you are the best.........masum

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

    All the members variable are derived into derived class according to the access specified. We can't say Private data members won't be derived because they are Private.
    1. Write a public function which prints the Private member variable.
    2. Inherit the base class into derived class with Public access.
    3. Create an object of derived class & call the print function.
    4. You can access & print the Private member variable from that print function.

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

    So underrated channel!!!!!, best explanation i can get abt programming....✌

  • @dkf28
    @dkf28 4 роки тому +2

    You are really the best programming teacher

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +1

      Thank you so much buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇

    • @dkf28
      @dkf28 4 роки тому

      Simple Snippets I for sure will 💪🏼🔥

  • @wurmh2hm
    @wurmh2hm 5 років тому +1

    Sir once again you proved yourself best...

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thank you Sahil 😁 really happy to hear this from you buddy ☺️ please share the videos with your friends too ✌️

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

    student ka loss hua hai. kyuki jab jab cpp search kiya , apka video 3rd number pe aya hai. first place me ana chahiye. VERY WELL explained. me mech se hu fir bhi cpp me interest jaga diya apne.

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

      Thank you so much Shreyash. Bohot acha laga ye sunkar. Aap videos and channel ko share karogey toh youtube no 1 par layega videos ko toh ye aapke hath main hai🙂

  • @anasmirza8093
    @anasmirza8093 5 років тому +3

    and the perfect illustration of this topic , amazing sir

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thank you so much buddy 😊 I'm glad to hear this from you ✌️

  • @Rockstard4
    @Rockstard4 6 років тому +5

    You have done a great job...

  • @dogwoofwoof8154
    @dogwoofwoof8154 6 років тому +3

    It was just awesome
    the way you explain things are awesome

    • @SimpleSnippets
      @SimpleSnippets  6 років тому

      Hey buddy, I'm really glad to hear such a great comment from you. Glad you liked the video and find it helpful. Please share the videos with your other friends who will find it helpful to and keep sharing the knowledge 😇✌️

  • @Jyotikumari-zu6dg
    @Jyotikumari-zu6dg 3 роки тому +1

    you are a gem

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

    This was incredibly precise and covered every detail !

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

    Nice explanation 👍

  • @Ninonakano_00
    @Ninonakano_00 4 роки тому +1

    Thank you so much for making this C++ video !!!!!!!!

  • @amutha6579
    @amutha6579 5 років тому +1

    beautiful teaching sir.thank you so much.

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Most welcome Amutha 😊 glad to hear such a lovely feedback from you ✌️

  • @chhandchaughule3240
    @chhandchaughule3240 4 роки тому +2

    Amazing teaching sir , just watching your videos clears the mind about so many C++ topics .
    Lovely teaching style sir , and liked that "peace" in the end 😄

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      So nice of you. Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇

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

    It's really helpful.

  • @aryankashyap4404
    @aryankashyap4404 6 років тому +14

    Maybe you have very less atm, but soon i think you will have trendous subscribers. Amazing videos you make

    • @SimpleSnippets
      @SimpleSnippets  6 років тому +1

      Hey Aryan thank you so much for such a wonderful and positive comment buddy. Yes hopefully we will be a big channel soon. But it's all in your hands to share the channel and videos with your friends 😋 help me share the knowledge with as many as you can. Keep up the support ✌️😇😎

  • @Hydro1738
    @Hydro1738 5 років тому +2

    Whats going on guys?... this videos are amazing... why don´t you click "like"?... is the least thing we can do to support the creator...

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +1

      Thank you so much brother for this kind gesture. Means alot to me 😇

    • @Hydro1738
      @Hydro1738 5 років тому

      @@SimpleSnippets Hi, your work is great!!, ... just one comment... I'm following you videos and talking about this one, a realized that:
      A "private" variable of a parent class is still present in the child class (public,protected or private inherited), but such private variable can´t be seen by a child class by means of not-inherited functions or by overritten functions. If you try to access a parent-private-variable by means of an inherited function you can acces the "private variable", ... is still there, and you can read it and modify it by any inherited member function.

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

    Aww, thank you so much man

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

    thanks brother

  • @Asdf-wm4ow
    @Asdf-wm4ow 5 років тому +1

    Very helpful!!!

    • @SimpleSnippets
      @SimpleSnippets  5 років тому

      Thanks buddy, please do subscribe to our channel & share it with your friends too buddy. Thats the biggest help & support 😇

  • @rushikadlag8002
    @rushikadlag8002 4 роки тому

    understandable language ..🤘
    Thank you

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +1

      Glad to hear that buddy. Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇

  • @purnimakshirsagar6768
    @purnimakshirsagar6768 7 років тому +2

    Well explained :-)

    • @SimpleSnippets
      @SimpleSnippets  7 років тому +2

      +Bhävîkä Kśhïršãgãŕ hello, thank you so much ✌️ do share the video with your friends and contacts and keep spreading the knowledge 😇

    • @purnimakshirsagar6768
      @purnimakshirsagar6768 7 років тому

      Yep

  • @nashhash4625
    @nashhash4625 6 років тому +1

    Awesome

  • @gurjotsingh5924
    @gurjotsingh5924 4 роки тому +1

    is constructor of base class come into the derived class?

  • @ar3568row
    @ar3568row 4 роки тому +1

    why do you always use int main() , i tried to use void main() in code blocks , it gave me an error "main function must return an integer value" , even though my main() wasn't supposed to return anything , i should have been easily allowed to use void.
    what is wrong ? please help . :(

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому

      Good question, here is a stackoverflow thread on this same question which will clear your doubt - stackoverflow.com/questions/449851/why-do-we-need-to-use-int-main-and-not-void-main-in-c

    • @ar3568row
      @ar3568row 4 роки тому

      Thanks , Got it , grateful to your contents 👌

  • @SMmmm-t9j
    @SMmmm-t9j 4 місяці тому

    After the access specifier become protected in derived class How can I access the protected data members from the derived class??

  • @neerajmahapatra5239
    @neerajmahapatra5239 5 років тому +2

    You are great but why there are no ads on your videos 😢😢😢
    Other tutorial videos have lot of ads on thier videos😢😢

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +2

      Well its good for you guys na ✌️😊

    • @neerajmahapatra5239
      @neerajmahapatra5239 5 років тому +1

      @@SimpleSnippets but ads will give u money sir...

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +8

      Yes yes I have ads turned on. But money isn't my primary requirement 😊
      My primary need is to spread knowledge to as many as possible ✌️

    • @RaiMuhammadArslan786
      @RaiMuhammadArslan786 5 років тому +1

      @@SimpleSnippets love++!!!!!!!!!

    • @SimpleSnippets
      @SimpleSnippets  5 років тому +1

      Thanks buddy 😊

  • @relativity5441
    @relativity5441 4 роки тому +1

    Please provide source code too for practice.

    • @SimpleSnippets
      @SimpleSnippets  4 роки тому +1

      I think I do share all the code files on our official website. check this website - simplesnippets.tech/

    • @relativity5441
      @relativity5441 4 роки тому +1

      @@SimpleSnippets Brother u did create a outstanding content. I really enjoyed ur videos. I also checked ur website. It is also good and I also found codes there. But the website arrangement is not optimised enough for beginner like me. It will be great help for me if u kindly provide direct code link to concerned video in description.
      (Regards)

  • @manishadas7434
    @manishadas7434 5 років тому

    sir,when i ran this code,values of x and y showed zero.then i used this pointer in each case in the default constructor(this->x=5 etc),then it showed x=5,y=5. why is this happening??

  • @mohamadrizwan4849
    @mohamadrizwan4849 6 років тому

    bhai g make programs in multifiles please

  • @mohamadrizwan4849
    @mohamadrizwan4849 6 років тому

    please please please

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

    its very complicated to me ....

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

    Source code

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

    You should clear ur screen