Pointers to Derived Classes in C++ | C++ Tutorials for Beginners #55

Поделиться
HTML-код
  • Опубликовано: 21 дек 2024

Комментарии • 577

  • @CodeWithHarry
    @CodeWithHarry  4 года назад +84

    Instagram pe NASA wala video kis kisne dekha? Dekh lena - instagram.com/codewithharry
    Aur saare C++ videos ka source code website pe daal diya hai! - codewithharry.com/videos/cpp-tutorials-in-hindi-1

    • @DivyanshuLohani
      @DivyanshuLohani 4 года назад +1

      Harry Bhai java pe tutorial series banao please
      Btw
      Love your videos

    • @akashgoyal7279
      @akashgoyal7279 4 года назад +2

      Harry bhai php and asp.net pe videos bnao ki konsa jyda helpful h .

    • @lilagadtaula7597
      @lilagadtaula7597 4 года назад

      #codewithharry brother i have a problem related python programming
      mystr= "i live in urlabari"
      print(mystr.replace("i", "we"))
      in this code it changes all "i" in the string so how can we change only a specific word or character in python

    • @ashutosh-pandit
      @ashutosh-pandit 4 года назад

      @@lilagadtaula7597 If you want to change :-
      1). specific character then use indexing
      2). Specific word then use slicing (i.e.- index range)

    • @devilfrost9491
      @devilfrost9491 4 года назад +1

      So Glad your back with C++ 😊😊👍🏻

  • @Aiyaansh
    @Aiyaansh 3 года назад +76

    I just watched this video for 3 times and got complete clarity about pointer to derived class as well as base class, default behaviour. Next video of virtual was so simple because of this video.

    • @sanukumar6811
      @sanukumar6811 3 года назад +1

      bro can you please explain me the code line number 24. why we need to point base class pointer to derived class object? without that it is not running.

    • @miniart8670
      @miniart8670 2 года назад

      @@sanukumar6811 bro agr aapko smj aaya tha toh please muje bta do

    • @RohitBhamu08
      @RohitBhamu08 9 месяцев назад

      @@sanukumar6811 because if you don't do that the pointer won't be pointing to anything

  • @rishabhthakur12327
    @rishabhthakur12327 4 года назад +11

    aap bahut hardworking person ho. i like your work👍👍👍

  • @BHAKTIWALLAH001
    @BHAKTIWALLAH001 Год назад +1

    congrats sir waiting for ur 5million from months ...finally its 5 ....u r really a great person in the world...the way u teach us that any cllg or any universities cant give us ......

  • @criminalcoder6307
    @criminalcoder6307 3 года назад +6

    Easiest topic ever
    It's all about mindset and understanding..
    No need to watch again
    U explain it so nicely that I understood it on first go..

  • @harshsri3450
    @harshsri3450 2 года назад +4

    Harry bro, your videos are still helping people to educate themselves and clear their concepts in programming👍. You are really like a magician like how your videos are too much effective so that a person with zero coding knowledge and zero skills can start from scratch and become a pro in coding 🔥and can also tech their batchmates 😁

  • @theoptionalvlog1628
    @theoptionalvlog1628 3 года назад +1

    I recommended it, watch this video minimum two time whole concept should be cleared 👍👍👍👍👍

  • @harshpratapsingh1638
    @harshpratapsingh1638 3 года назад +1

    Pehle pointers sunke hi dimag phat jata tha lekin aap se padhne baad pointer banne laga thanks yrr is course ke liye🙏🙏

  • @sunnychauhan702
    @sunnychauhan702 4 года назад +1

    You are best teacher in the world sir, thankyou very much

  • @abrarahmad3897
    @abrarahmad3897 Год назад +2

    5:36 In my opinion, no error would be raised since the derived class is already inheriting the base class. Thus, it may not be wrong to point a pointer object of the base class to the derived class, Ig.

  • @rishabh6051
    @rishabh6051 4 года назад +2

    you have cleared all my doubts about this chapter thanks for making this video

  • @YUDDHYASWA
    @YUDDHYASWA 3 месяца назад

    👍🏻Dobara dekhi video Harry bhai,
    Aur zyada smajh aayi .

  • @amanbhadauria2881
    @amanbhadauria2881 3 года назад +7

    All the member of the base class are part of the derived class. However, the derived class can only access members that are public or protected.

  • @kumarvlogs298
    @kumarvlogs298 Год назад

    I have to watch it 4 times now I am clear about all the things happened in that program......
    recommended to watch it 2 times or more.....................

  • @techustaad4845
    @techustaad4845 4 года назад +6

    Bro I'm big fan of you. And watching you web development series. I want that please make ecommerce websites just using html & css. Thanks

  • @siddhanttiwari6367
    @siddhanttiwari6367 4 года назад +5

    Thank you very much sir for that much hard work for us ,you are the best
    . I hope you will keep uploading videos on c++ until the course end.😊😊😊

  • @Sherwaani
    @Sherwaani 4 года назад +6

    I've watched it 3x. Just for enhance my knowledge again & again.

    • @heyya2968
      @heyya2968 3 года назад

      3x playback speed nhi hoti yt me

    • @Sherwaani
      @Sherwaani 3 года назад

      @@heyya2968 mean 3 times

    • @heyya2968
      @heyya2968 3 года назад

      @@Sherwaani accha

    • @heyya2968
      @heyya2968 3 года назад

      @@Sherwaani ha thoda complicate kardiya hai isne kum waqt me explain karne ke liye

    • @shifuji-7154
      @shifuji-7154 3 года назад

      @@Sherwaani
      hey buddy , what does biding means here ??

  • @aaravanand2325
    @aaravanand2325 Год назад +6

    @codewithharry- What was the use of pointing base class pointer to derived class object .
    Neither it was able to change the value of derived class variable neither it was able to display the value of derived class variable
    Was it just used here so that we could understand the concepts ?
    If yes, please reply with a yes there are many comments asking for the same
    Thankyou

  • @rishabhthakur12327
    @rishabhthakur12327 4 года назад

    Harry bhai mujhe aapke sare tutorial best lgte hai please aap aise video bnate rhom hum aapko support krte hai.

  • @KshitizAgain
    @KshitizAgain 4 года назад +4

    Love your Work Harry Bhai!❤️😅Waiting for you to reach 1M Milestone!

  • @virajbenade5572
    @virajbenade5572 2 года назад +1

    Harry bhai Name of variable are choose in this video see to difficult to understand but concept clear thank you
    It is advice don't take serious...

  • @anshulpatil7525
    @anshulpatil7525 4 месяца назад

    thank you harry sir for explaining the concept so well

  • @gamerscell9975
    @gamerscell9975 3 года назад +1

    video ko 2nd time watch krne ma full smjh agaya '
    \

  • @Everything-uo8vt
    @Everything-uo8vt 4 года назад +385

    2 minutes of silence for those college teacher's who thinks they are the only source of students to learn programming

    • @biker_karanpal
      @biker_karanpal 3 года назад +15

      Don't compare any RUclipsr to teachers 👍

    • @biker_karanpal
      @biker_karanpal 3 года назад +2

      @Imperfect 👍

    • @MAX_RITIK
      @MAX_RITIK 3 года назад +1

      Hahaha

    • @criminalcoder6307
      @criminalcoder6307 3 года назад +32

      Teachers are useless nowadays and to some extent colleges also...
      Exceptions are always there.

    • @oggy107
      @oggy107 3 года назад +6

      they aren't even source...

  • @aryantiwari2103
    @aryantiwari2103 Год назад

    harry bhai these all are good thanks for giving complete c++ course

  • @codesrhodes3757
    @codesrhodes3757 3 года назад

    AAP sachme mahan ho harry bhaiya

  • @ambikadhakal6105
    @ambikadhakal6105 4 года назад +24

    Harry, Please zoom the code please

  • @MiniVlogsbySonu
    @MiniVlogsbySonu Год назад

    In start when he said to watch the video twice... I thought he is saying that for views and then when I actually didn't understand so i tried one more time and then it actually started to understand ❤

  • @silentknight2126
    @silentknight2126 2 года назад

    I wish i could like these videos more than thousand times...🥺❤️🔥

  • @engineerbhai7642
    @engineerbhai7642 4 года назад

    You are great coder in you tube.

  • @tejasthombare4501
    @tejasthombare4501 2 года назад +1

    Since from starting to the playlist ,Finally I shift from1.5X speed to Normal speed in this video.

  • @sabaqureshi4779
    @sabaqureshi4779 3 года назад +1

    Pta ni kesay log 3 din mein sari videos dekh letay hain aur unko samajh b aa jata h...maine tou pichly 3 videos 3 baar dekhy hain aur yeh video 2 baar dekha h aur sahi se practice ki h tb ja kr yeh concept clear hua h mujhy....😞

  • @webwithnasir
    @webwithnasir 4 года назад +2

    Sir ji i am pakistaani but i like your vedios such a informative vedio.......good task....weldone sir

  • @vishalsaxena4869
    @vishalsaxena4869 4 года назад +2

    you are just awesome Harry Bhai. I have learn many things from your channel. Video playlist is so awesome. and your way of explaining is mind blowing.
    one little request that please make tutorials on angular too.'
    thanks

  • @kumkumbhagya51
    @kumkumbhagya51 Год назад

    aaj maine ye video 2nd time dekhi aur is baar aur bhi ache se samjh aa gyi

  • @mikey_0.
    @mikey_0. 4 года назад +1

    Great teacher

  • @ravinderchauhan9007
    @ravinderchauhan9007 4 года назад +1

    hlo herry bhai yor are great bro thanks for lerning c++

  • @uditjoshi199
    @uditjoshi199 2 года назад +1

    5:41 No because the datatypes are different pointer is made to store adress of baseclass objects

  • @ChiragVaishnav-c4x
    @ChiragVaishnav-c4x Год назад

    After watching poly times, finally completed understood the main concept of the video.

  • @varungupta6119
    @varungupta6119 4 года назад +4

    sir please make series on how to build logic for beginners using (Data Structure, Algorithms, Decision making statements.
    Selection statements.
    Iteration statements. Jump statements. etc)
    please reply sir

  • @vijaymala4846
    @vijaymala4846 4 года назад +1

    Mast hai Bhai !!!

  • @AyazKhan-kr6qv
    @AyazKhan-kr6qv 4 года назад +1

    I watched 3 times and now 101 percent clear

  • @anirudhsinhrajput9238
    @anirudhsinhrajput9238 4 года назад

    Harry bhai...your videos are awesome....plzz never stop making such amazing videos

  • @rishabhjain911
    @rishabhjain911 3 года назад

    # I will definitely watch this video again

  • @ronnie_10000
    @ronnie_10000 3 года назад +2

    5:35 error will be there I think because maybe it will also inherit the pointer to base class.

  • @mdarsad7694
    @mdarsad7694 2 года назад

    i love the way of your teaching
    thank you

  • @prodevmahi4901
    @prodevmahi4901 3 года назад

    really we need to see this video twice to understand properly

  • @jinsishahcs7889
    @jinsishahcs7889 3 года назад

    harry bhai you are a saviour

  • @rishabhjain911
    @rishabhjain911 3 года назад

    Thanks Harry Sir for this helpful video

  • @WHITEDEVIL-nu5og
    @WHITEDEVIL-nu5og 3 года назад

    thankyou bro for the informative video and for your last instruction which is
    "watch the video again"
    thankyou keep going doinig good workk
    god bless you

  • @karanrawat1659
    @karanrawat1659 4 года назад +10

    Sir one kind request , please try to visualize us by showing animation that how pointer is being pointed or allocation of memory ,etc.

  • @shreyashkumarsahu5985
    @shreyashkumarsahu5985 11 месяцев назад

    7:41 error logically will not be thrown but the concept which I am getting confused with is that baseclass is kind of inheritating derieved class which seems a bit strange as per my understanding

  • @Shadow__Frost
    @Shadow__Frost Год назад

    11:29 most important line in this video

  • @Kaushik846
    @Kaushik846 11 месяцев назад

    Great explanation!!

  • @kiranshinde03
    @kiranshinde03 3 года назад

    7:31 program run karega 😁 harry Bhai ❤️

  • @satyamkarn3277
    @satyamkarn3277 2 года назад

    Very Good video💖💖💖

  • @sitadevisushan8074
    @sitadevisushan8074 4 года назад +2

    Sir, Please Make A Full Playlist Of Java Programming For Absulate Beginners Plz Sir🙏🙏

  • @trilochanyannawar525
    @trilochanyannawar525 3 года назад +1

    Kota Factory : Jeetu Bhai
    RUclips : Harry Bhai.
    Yes. I said that.

  • @het_mehta
    @het_mehta Год назад +1

    yes it will run

  • @royfamily9273
    @royfamily9273 2 года назад

    Thanks Harry Bhaiya

  • @ChiragVaishnav-c4x
    @ChiragVaishnav-c4x Год назад

    Thank You, Sir !

  • @imabhishektomar_
    @imabhishektomar_ Год назад +1

    i think at 7:37 program should not run because bhai int main me upr vale koi bhi function ko call nhi kiya gya shyd

  • @mohitbalwani
    @mohitbalwani 4 года назад

    East or west, harry is the best !

  • @akashgoyal7279
    @akashgoyal7279 4 года назад

    Harry bhai aapke videos bhot helpful hote hain. Please php and asp.net ke liye video bnao ki konsa jyda helpful h.

  • @AyanKhan-zh4it
    @AyanKhan-zh4it 3 года назад

    I'm stuck on this video man!!! whenever i watch it, at the end Harry bro says it to watch it again😂😂 so i can't proceed to the next video. XD

  • @princekangra5711
    @princekangra5711 2 года назад

    You are best sir

  • @divy8999
    @divy8999 3 года назад +1

    harry bhai please make videos for data structure and algorithm in C++.

  • @gautam4696
    @gautam4696 3 года назад

    easy thanks to harry sir.

  • @programmingfacts1385
    @programmingfacts1385 3 года назад

    Nice explanation

  • @arjunmaindarkar106
    @arjunmaindarkar106 4 года назад

    Harry bhaiyya big fan❤

  • @binodbastola8255
    @binodbastola8255 Год назад

    mujhe ek baar mey hi samaj agaya

  • @arvindrawat247
    @arvindrawat247 2 года назад

    5:40 no is my answer harry sir

  • @deepakchand5893
    @deepakchand5893 4 года назад

    Love u bhai my inspiration

  • @TheISP
    @TheISP 4 года назад +5

    5:36 I think there will be an error, because Base Class does not contain all features of derived class, but derived class contains all features of base class
    11:30 doubt cleared, we can't access unique elements of derived class using base pointer.

  • @SakshamMaheshwari-z6r
    @SakshamMaheshwari-z6r Год назад +1

    sir, in our college, we have to taught exception handling keywords like try, catch throw etc. but you did not cover these topic in your playlist . PLz reply

  • @nkbanerjee2549
    @nkbanerjee2549 2 года назад

    after watching for 2nd time this video is completely understandable now

  • @Ayush_.
    @Ayush_. 3 года назад

    Base class ka pointer shirf base class ki Properties ko hi Access kar skta he ........
    jabki derived class ka pointer dono class ki properties ko access kar skta he .....par member function ke naam same hone par derived class ka pointer phlle derived class ke function ko run call krega

  • @copyrightfreegameplays7731
    @copyrightfreegameplays7731 4 месяца назад

    7:35 yes

  • @abrarahmad3897
    @abrarahmad3897 Год назад +2

    Harry, just a question, if we cannot access the methods and members of the derived class with the pointer of the base class then what is the use of pointing that pointer of the base class to the object of the derived class? I mean, we could simply made a base class pointer and our code would work perfectly fine while occupying less memory space.

    • @lavkushdas5529
      @lavkushdas5529 Год назад

      same Qs of mine. What's the use of pointing to derived class then?

  • @parthokaysar2111
    @parthokaysar2111 Год назад +1

    Harry sir.
    You have not told us all about operator overloading.
    please give a detailed video on it.

  • @sarthakvats1634
    @sarthakvats1634 3 года назад

    5:35 Yes

  • @aryan7069_
    @aryan7069_ 3 года назад

    5:35 yes

  • @mishitaarora3109
    @mishitaarora3109 2 года назад +1

    Amazing content sir...your videos are really heplful
    Please tell can we point to a base class using a derived class pointer...?

  • @shahmirkhan7145
    @shahmirkhan7145 Год назад

    5.36 i think it can not generate error because you can inherit the base class in derived class so you can point base class object to derived class object

  • @designin7817
    @designin7817 4 года назад

    You Are awesome.

  • @sheheryarahmad2110
    @sheheryarahmad2110 2 года назад

    run kre ga😎

  • @RADHEKRISHNA_437
    @RADHEKRISHNA_437 4 месяца назад

    Other's - click on subscribe button
    Harry sir - Ganta dabaye 🤣🤣

  • @lalpreet2125
    @lalpreet2125 2 года назад

    5.41 yes

  • @Aiyaansh
    @Aiyaansh 3 года назад

    5:40 Yes it will throw an erroy

  • @AmanKhan-lj3wh
    @AmanKhan-lj3wh Год назад

    though got the overall logic at first time but it took around 40 min to well understood.

  • @shivanksharma5443
    @shivanksharma5443 4 года назад +1

    sir can you please post a course for ethical hacking for absolute beginners. i have been searching for this course on you tube for a long time but cannot get any course for absolute beginners.

  • @AjinkyaAJJadhav
    @AjinkyaAJJadhav Год назад

    base class pointer can point to derived class object only if base class is inherited publicly to derived class. Remove Public and same will not happen.

  • @ua-itgeek2943
    @ua-itgeek2943 4 года назад +1

    No Error

  • @adityarajsinghgour3113
    @adityarajsinghgour3113 3 года назад +1

    can u tell which color theme u are using in VS Code

  • @ujjwalsingh2658
    @ujjwalsingh2658 4 года назад +1

    Nice

  • @mitsu7june
    @mitsu7june Год назад

    5:48 yes it will throw error

  • @ashutosh2933
    @ashutosh2933 3 года назад +2

    I think u r wrong harry bhai ... 8:32 You said " Isey kehete hai Late Binding " yaha early binding ho rahi hai
    15:40 u again said " ye hai run time polymorphism ", no its not, binding is static here and pointer type ko dekh kar , compiler function ko compile time me bind karega us type ke sath.... we can use virtual keyword to achieve late binding

  • @arfeenasif-ut1cs
    @arfeenasif-ut1cs Год назад

    I watched this video 3 times and still at the end Harry Bhai saying watch again

  • @TonyStark-tu4et
    @TonyStark-tu4et 4 года назад +3

    Bro you teached me programming in class 9th

  • @Ashueeueeeeee
    @Ashueeueeeeee 4 года назад +2

    Sir ji c language ke bare Ek video bna dijiye
    Mene aapki c programming playlist me se #8 video dekh liye hai
    And I am a biggener