Virtual Functions in C++ | C++ Tutorials for Beginners #56

Поделиться
HTML-код
  • Опубликовано: 16 окт 2024
  • Download the best IDE for C, C# and C++: bit.ly/WholeTo...
    ►Source Code & Resources: codewithharry....
    ►This video is a part of my C++ playlist: • C++ Tutorials In Hindi
    ►Checkout my English channel here: / programmingwithharry
    ►Click here to subscribe - / @codewithharry
    Best Hindi Videos For Learning Programming:
    ►Learn Python In One Video - • Python Tutorial In Hin...
    ►Python Complete Course In Hindi - • Python Tutorials For A...
    ►C Language Complete Course In Hindi -
    • C Language Tutorials I...
    ►JavaScript Complete Course In Hindi -
    • JavaScript Tutorials I...
    ►Learn JavaScript in One Video - • JavaScript Tutorial
    ►Learn PHP In One Video - • Learn Php In One Video...
    ►Django Complete Course In Hindi -
    • Python Django Tutorial...
    ►Machine Learning Using Python - • Machine Learning Tutor...
    ►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
    ►Advanced Python Tutorials - • Intermediate/Advanced ...
    ►Object Oriented Programming In Python - • Object Oriented Progra...
    ►Python Data Science and Big Data Tutorials - • Python Data Science an...
    Follow Me On Social Media
    ►Website (created using Flask) - www.codewithhar...
    ►Facebook - / codewithharry
    ►Instagram - / codewithharry
    ►Personal Facebook A/c - / geekyharis
    Twitter - / haris_is_here

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

  • @GauravKumar-dw2ml
    @GauravKumar-dw2ml 4 года назад +137

    Summary-
    // As we have seen in tut55.cpp that BASE class pointer pointing to DERIVED class object can only access BASE class inherited members which is a default behavior.
    // But if you want to change default behavior and want to access the members of derived class by a pointer pointing to derived class object then use virtual keyword in front of BASE class member function.

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

      Exactly

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

      but what if you have passed different arguments to the display function in both the class? its not working then.

    • @RoyBoyLab
      @RoyBoyLab 2 года назад +2

      If they contain exactly same fn (name and argument) then the BASE class pointer pointing to THE DERIVED class can call only BASE class fn.
      To call the derived class fn we declare the BASE class fn virtual

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

      @@shabbirhabib9447 different in what manner?

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

      ruclips.net/video/FMsDIg_Wjpw/видео.html

  • @sagyan0737
    @sagyan0737 4 года назад +112

    This guy really deserves 100M+. Really the best RUclipsr. The way he teaches is wonderful. I am from Nepal 🇳🇵, heart this comment.

  • @vikasrathore8620
    @vikasrathore8620 2 года назад +77

    Harry Bhai, i started learning C++ from this playlist on 12th October 2021, and today it is 24th December 2021. It is going to complete soon. Thank you so much for this course.🤩😇 Motivated++

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

      how r u bro what is ur situvation now
      i am first year cse student what about u
      what uses did u get from this course
      please reply it will be usefull for me bro

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

      On 12 oct there is birthday of rm of bts oh im bts army😃

    • @vikasrathore3955
      @vikasrathore3955 2 года назад +2

      @@sudheepro All the concepts of Object Oriented programming are covered in this course. Once you have completed this course, you will be able to switch to any other language which supports object oriented programming.
      The topics are explained to the point, and in a very different manner than other tutorials. The examples given by Harry bhai are still fresh in my mind. ❤️

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

      @@vikasrathore3955 bro operator overloading toh nhi hai isme

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

      @@deepikakar5394 haanji.. operator overloading is missing in this course.

  • @mr.artrauniyar
    @mr.artrauniyar 2 года назад +47

    NOTE: You can also use "void virtual" instead of '"virtual void "

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

    Harry bhai...I have shared your channel to all my friends....I don't know why do you get such low views... ..bhai esa content to aajtak kisine nahi diya.....pura practical samjate ho aap....thank you soo.. much.....

  • @devilsword8883
    @devilsword8883 4 года назад +9

    You are the best teacher because you help to the poor people . You had made a lot of courses for us!

  • @shubhamsharma8736
    @shubhamsharma8736 4 года назад +14

    Thank you Bhai for making quality videos for us. I love your videos.

  • @aliahsan4586
    @aliahsan4586 2 года назад +11

    Great work Harris bhai, kindly also give the concept of Shallow copy vs Deep copy as this question was asked in an inteview on basic level of programming.
    THANKS

  • @ghufran_khan
    @ghufran_khan 4 года назад +51

    Sir! Your channel is growing really fast

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

      Yes, thanks a lot for all the love and support!

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

      @@CodeWithHarry Thanks for providing quality Content

    • @KRISHNA-tf4tv
      @KRISHNA-tf4tv 4 года назад +3

      @@CodeWithHarry sir will you please make some more videos on android development please please bhaiya ji i m in class 8 and i am really interested in programming and also thank you very very much for such awesome and free content 👍😊.

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

      @@CodeWithHarry Bro is topic pr vedio bnao
      Social media app ko kis kis languages m likha gya h ye app working Kese krta h
      Like WhatsApp m kya kya use huaa h
      Button, icon, page, label, command, ....ect

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

      abbbe par isse ye bhi poocho ki operator overloading kaha hai😭😭

  • @niranjannayak4154
    @niranjannayak4154 3 года назад +31

    i didn't find operator overloading in your playlist bro

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

      No operator overloading in his playlist

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

      Padhaya hai bhai

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

      @@yogendranathsingh2576 video no. kya hai isme

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

      yeaaa even i could'nt find. so i did refer to Simplilearn for operator overloading and its super easy!!

  • @ManojVerma-yj4mb
    @ManojVerma-yj4mb 4 года назад +16

    I am a chef and I want to change my job I like programing language.
    Can I join software industry without doing diploma or degree courses...???

    • @samarpitgupta8000
      @samarpitgupta8000 3 года назад +4

      Just mark ur presence in coding platforms like codechef and try competitions try to get online certificates ..... And prepare small and right knowledgable resume for interview in any company.... ..

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

    Finally Completed this series ! Harry Bhai - Ab taq ki yatra safal ! Bahoot Bahoot Dhanywaad ! Cheers & Peace !

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

    I liked u r videos sir..... I just started to see u r first videos of c++. Iam glad to say that u r videos are awesome

  • @programmingwithjavascript3579
    @programmingwithjavascript3579 3 года назад +34

    Your teaching method is extra outstanding 🔥🔥🔥🔥

  • @pritiladda8740
    @pritiladda8740 10 месяцев назад +1

    thank you so much you have cleared out my biggest confusion in cpp 😊

  • @mohit7717
    @mohit7717 3 года назад +3

    You Great sir, how simply describe everything ,loved your channel...I'm accessing this playlist from staring

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

    Thank you sir, very helpful video God bless you,,.

  • @Shivam.Tiwari.
    @Shivam.Tiwari. 7 месяцев назад

    with the pointer of base-type we can use functions of derived class if and only if the base function is virtual,
    however, the derived variables won't change with pointer.

  • @skill-f
    @skill-f 3 дня назад

    best explanation ever on the topic polymorphism.

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

    Sir muze main function me derived class ke variable ko initialize karna hai to kya muze derived class ka pointer create karna padega?

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

    Thank you so much Harry bhai 💗 virtual function clear ...

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

    God bless you Harry bhai. You are helping us in a incredible way

  • @NitinYadav-fw4jl
    @NitinYadav-fw4jl 2 года назад +1

    Harry bhai super se bhi uper🤘🤘

  • @TechnologyRecords
    @TechnologyRecords 3 года назад +3

    1:11 literally jab mai easy hota hoon
    Le harry bhai:
    dehaan se sunna baat ko.

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

    Question ?
    Bro, as you have said in tut55.cpp, we can use derived class members if we use derived_class_pointer pointing to derived_class. (like base_class_pointer= &obj_derived), so why there is a need of "Virtual functions" to access derived class member function. We can do the same by creating a pointer pointing to derived class (like derived_class_pointer= &obj_derived).

    • @IDK-sk2yj
      @IDK-sk2yj 2 года назад +1

      that's was a type of compile time example.., and in that we weren't able to get the derived function functions using base class pointers. So virtual functions is made for accessing the derived class functions using base class pointers.

  • @unknown98171
    @unknown98171 4 года назад +3

    Love you sir 300000 times.... I'm of 13 and I regularly watch your videos please reply

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

    Last videos was to helpful to understand this topic ❤️

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

    harry bhai you can create an module in python
    which gives the the time and space complexity of program it will be a great module in python
    whats your perspective

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

    You are great thnx

  • @goodcake05
    @goodcake05 3 года назад +3

    Awesome, really best course harry bhai and that's all for free 🔥🔥🔥

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

    Harry bhai aapke videos bahot motivate krte hai 😊

  • @KapilKumar-pk9vz
    @KapilKumar-pk9vz 4 года назад +2

    Thanks Sir for your Excellent effort

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

    Agar vise versa ho to?? I mean agar hume derieved class ke obj ko point karana hai base class ke member function ko aur hume base class ka function execute karana haii..to??...

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

    Thanks Harry bhai for explaining virtual functions !!

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

    sir please also teach exception handling and operator overloading

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

    Bro is topic pr vedio bnao
    Social media app ko kis kis languages m likha gya h ye app working Kese krta h
    Like WhatsApp m kya kya use huaa h
    Button, icon, page, label, command, ....ect

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

    Thanks sir your video really help a lot❤❤❤❤

  • @AhmedRaza-ty7zq
    @AhmedRaza-ty7zq 10 месяцев назад +1

    Awesome video😎😎👍👍

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

    Sir mere pe ek hi computer hai isliye please vs code ko reset kaisa kerte hai bta do tabhi mai shikh skta hu coding

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

    Why the virtual function is not working if we pass arguments in derived class function??

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

    but what if you have passed different arguments to the display function in both the class? its not working then.

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

    look how easy he made this concept.
    That why he is best

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

    Virtual functions in C++ allow runtime polymorphism, where the function called is determined at runtime based on the object type, not the pointer type.
    Key moments:
    00:00 Virtual functions in C++ allow a function in a base class to be overridden in a derived class. Making a function virtual enables runtime polymorphism, executing the derived class function when called through a base class pointer.
    -Understanding the concept of pointer to derived class and polymorphism is crucial for comprehending virtual functions in C++. This knowledge forms the foundation for implementing runtime polymorphism.
    -By making a function virtual in the base class, you ensure that the derived class's version of the function is executed when called through a base class pointer. This dynamic behavior enhances code flexibility and extensibility.
    06:29 Polymorphism in C++ allows objects from different classes to respond to messages, achieving runtime polymorphism through virtual functions. Compile-time polymorphism involves function and operator overloading for different behaviors based on arguments.
    -Explanation of polymorphism in C++. Objects from different classes can react to messages, enabling runtime polymorphism with virtual functions.
    -Compile-time polymorphism in C++. Function and operator overloading create different behaviors based on arguments, determining the function binding during compilation.
    08:29 The video discusses virtual functions in C++, providing examples and rules for implementation. It emphasizes understanding and practice for effective learning.
    -The importance of practicing virtual functions to enhance understanding and learning in C++. Encouragement to create more examples for better comprehension.
    -Upcoming content on rules of virtual functions, late binding implementation, and examples in the next video. Emphasis on grasping the virtual keyword and functions.

  • @sakettripathi392
    @sakettripathi392 Месяц назад

    An important point , we can point an object of base class to an object of derived class but VICE-VERSA IS NOT POSSIBLE.

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

    watched many videos brother but you cleared all the doubts that i had on virtual function. Thank you😍

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

    sir jo display function derived class m h woh base class se derived hoga ya woh derived class m nya banaya gya h???

  • @thehalfmatured
    @thehalfmatured 3 года назад +3

    Harry bhai, what if we want to assign an integer value to the variable in derived class using "base_class_pointer->var_derived = 20;".......this shows an error

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

      Will throw an error because base class pointer cannot access derived class variable

  • @MysteryPath-go7ky
    @MysteryPath-go7ky 3 месяца назад

    Sir how to access derived class variable using base class pointer?
    Can we modify the value of var_derived by using base class pointer???

  • @ritikabali6466
    @ritikabali6466 3 года назад +4

    you missed the operator overloading topic :o

    • @amanahmed6057
      @amanahmed6057 3 года назад +3

      wha whaa ,, Unhone jo itna saaaraa padyaa hai wo padle pehle baadme kamiyaan nikaal lenaa

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

      @@amanahmed6057 hahaha

  • @adityapradhan8474
    @adityapradhan8474 9 месяцев назад +1

    Agyaa samajh me achese!

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

    It is necessary to take the pointer of base class?

  • @kaushik.kakdey
    @kaushik.kakdey 4 года назад +2

    Django Class Based Views, Django Rest Framework ki playlist bana do 🙏

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

    All dout clear thanks🙏
    Harry bhai

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

    🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏
    Why do we need to point derived class object with base class pointer?
    🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏🙏

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

    A humble request sir plsss iss course ko advance tak le jayiye....and pura course jald se jald khatam kar dijiye...

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

    bhai operator overloading pa video bano plz :)

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

    sir really i got it, sir i can't explain my feeling.. i am so proud of you..

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

    Sir, we can access the derived class using it's objects, so why there is virtual function? why do we want base class pointer to access derived class methods? If anyone is having this answer please reply. This question is asked to me in an interview but I was unable to answer it. I replied that when we create a class to inherit it's properties then we need this but interviewer was not convinced.

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

    carry bhai aap bahut hardworking person hi. please daily video upload kro kro aap kisi na kisi pr .

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

    Bro I learnt python by watching your videos. I do not have a pc or desktop so I program in Android. I am facing problems in making Jarvis please help sir.

  • @DhruvM.D.PrajapatiMoridhara
    @DhruvM.D.PrajapatiMoridhara Год назад

    Sir , can we made both function as virtual ... ? It'll throw any error ?

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

    Great series

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

    Your teaching is really amazing... thanks a lot.. you've changed my life 🙂

  • @Yuvikatv
    @Yuvikatv 5 дней назад

    Why we need to make base class pointer if we want to use derive class function just make pointer to detive class

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

    Sir plese mujhe ye btaiyega ki ye aapka complete course hai??
    & Kya hmm aapke tutorials se c++ me mastery kr skte hain??
    👍👍👍👍👍👍👍👍👍👍👍

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

    Bro ! Could you please make a video on "Biometric Identication using ML" ? I have researched about it and couldnt find many articles on it. Afew articles that too by foriegn authors were available that werent as useful as they should be !

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

    Harry, what is the best book for a python "beginner". I have seen all of your videos on Python two times. Please reply I want to start a book now on python.

  • @user-tr3vo8bm5c
    @user-tr3vo8bm5c Год назад +33

    Ye to Pehle se hi 2× m h🙂isee kaise 2× m dekhu

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

    Hello Harry. The same is also true with references, so why do we use pointers ?

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

    Harry Bhaii Agar base class ke pointer ko derived class ke object ko point karana zaroori h kyaaa??

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

    please make tutorial on reactjs in one video, very much needed

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

    Sir I'm waiting for next video of php

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

    Sir me apke channel par 1week phele hi add huwa hu aur mujhe ye janna h ki app development khaa se start kare mujhe samjh nhi aa rha ki me konsi video dekho 😔😔aur mujhe bikul basic se sikhna h plz urgently tell me. Aur agar subscriber's me se kisi ko pata ho to bata do plz

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

    Sir muzye Cyber security as a career Kar na hai too Mai Kya sikhu muzye python, JavaScript, networking,aati hai but aurr isse aage Kya sikhu give me advice your advice is helpful for me for my career

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

      You can do any course on Coursera or Udemy . Even a small certificate from them is very beneficial

  • @AjaySingh-iy2th
    @AjaySingh-iy2th 4 года назад +1

    @CodeWithHarry Please Create a full tutorial on c++ STL

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

    U r the best

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

    concept cleared 6:03

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

    Thanks Harry Bhaiya

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

    Harry sir
    Please batao
    B.tech in artificial intelligence is good
    Or
    Bsc(maths, statistics,cs)
    For becoming data scientist

    • @Gintoki.Sakata918
      @Gintoki.Sakata918 4 года назад +2

      Please help

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

      @@Gintoki.Sakata918 I guess you should do Bsc(maths,etc) and take a course for AI in coursera. I am a 13 year old, but I was able to complete a Masters degree from Coursera. Doing the Masters in AI from Coursera, even before Bachelors will be good for resume

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

    Sir I want to make website for education porpose where paid item also available and app also on play store how it done sir plzzz

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

      JAB AATA HI NAHI TOH BANAYEGA KYAA LAV**

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

    Thank you so much Harry Bhai.

  • @AjitKumar-qj7pm
    @AjitKumar-qj7pm 4 года назад

    Mast hai mast bahut badiya coder hai tu

  • @KapilKumar-pk9vz
    @KapilKumar-pk9vz 4 года назад

    Thanks Excellent & keep me update time by time

  • @_.ashujaiswal._
    @_.ashujaiswal._ Год назад

    5:22 how did you initalized the varibale inside the class while declaring the variable

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

    love you sir....today i know fan means..... and i am your fan sir................ lot of love from Pakistan..

  • @ankit.chaudhary.dev33
    @ankit.chaudhary.dev33 8 месяцев назад

    You are my inspiration harry bhaiya, I got place as SDE in Dassault Systemes just by your videos and leet code🎉🎉 I hope you never stop youtube😊

    • @abhi.1867
      @abhi.1867 7 месяцев назад

      which cllg bro and package?

    • @ankit.chaudhary.dev33
      @ankit.chaudhary.dev33 7 месяцев назад

      @@abhi.1867 its a tier 3 cllg modern college of engineering, 11LPA

    • @abhi.1867
      @abhi.1867 7 месяцев назад

      cool, so on campus or off?@@ankit.chaudhary.dev33

    • @pulkit8133
      @pulkit8133 6 месяцев назад +1

      congratulations bro :)

  • @AwaisKamboh-z1s
    @AwaisKamboh-z1s 10 месяцев назад

    difference between shallow and deep copy?

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

    I love your video sir...

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

    You are really great bro please continue the playlist of cpp

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

    Bhai aapne Tkinter series me pycharm me kaunsi color theme use kari thi please tell

  • @vaibhavsingh-qr6sy
    @vaibhavsingh-qr6sy 4 года назад

    U r explanation is always best harry bhai

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

    Harry Bhai What should I learn first C or C++ ?

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

      You should learn C or Python first. Then Java and C ++. You can also learn HTML and CSS before Python

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

      Y

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

    Hiii harry bhai
    You are great bro, me Apko kafi time se follow kar raha hu c ,python ,web development apke toutorial se seekhi hai
    I hope ap hamesa ayese hi sport karte rahege... ❤❤❤
    Thanks bro... ❤❤

  • @_Jaygurjar
    @_Jaygurjar 2 года назад +2

    bro but how can you use member of derived class form base pointer because we inherite derived class so how can you access derived class member ?

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

      That's the point of the video ..
      By using virtual fn in base class
      Base class wala display ne bol diya ki mujhe mat use karo .. balki mere naam wala jo same fn derived class mei hai usko use karo

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

      @@RoyBoyLab par derived class ka object hi base class ko use kar sakta he par yha pe base class derived ko use kar rah he wo kese because inheritencr kehta he ki child class use bas class not base class derived class

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

      @@_Jaygurjar bhai bahut mushkil se samjha kya likha hai...
      Arey pointer ka datatype BaseClass hai ....
      Andt vo derive class ko point kr sakta hai ..
      But it cannot acces is derived class members .
      POINT KR SAKTA HAI ACCESS NAHI
      YEH PICHLE VIDEO MEI THA..
      iss video mei ... With the use of virtual function in base class...
      Even the baseClass pointer( pointing to derived class) can call that same named fn of derived class .

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

      @@RoyBoyLab thick he

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

    thank you sir explaining virtual fuction 🔥 it help me a lot🙂

  • @DR-xz3dk
    @DR-xz3dk 4 года назад +2

    Harry bro, shall I start learning c++ for my bca 2nd year or shall I learn C first????????????

    • @ManishSharma-fi2vr
      @ManishSharma-fi2vr 4 года назад +1

      Bhai C++ se sikh le....aesi kuch problem nhi aayegi....sir nei Sb kuch suru se bataya h....data types, variables, etc.

    • @DR-xz3dk
      @DR-xz3dk 4 года назад +2

      @@ManishSharma-fi2vr thanks Manish

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

    5:35 itni der se error aa rha tha fir pata chala maine derived class bana to di thi lekin maine inherit nhi kiya tha base class se

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

    thank you for your efforts for us

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

    please give us a detailed video on operator overloading.

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

    Sir pls complete Android Tutorials and make some projects on it like Instagram clone , Facebook clone etc