Constructors in Derived Class in C++ | C++ Tutorials for Beginners #46

preview_player
Показать описание

Best Hindi Videos For Learning Programming:

►C Language Complete Course In Hindi -

►JavaScript Complete Course In Hindi -

►Django Complete Course In Hindi -

Follow Me On Social Media
Рекомендации по теме
Комментарии
Автор

The first time I watched this video, I was laughing because I knew that okay I need to watch this again, this was over. Now, second time I am finding it completely comfortable. 👍👍

umeshkaushik
Автор

Thankyouuuu so much for this playlist, I passed in my exams

spoorthim
Автор

13:00 for those who are looking for a proper name of this syntax, it is called initializer list constructor

gamersgame
Автор

Your courses are so useful and knowledgeable so I'm requesting you for that.... 😊

carloverzz
Автор

I watched it twice ..now it is crystal clear.

ashishzade
Автор

best teacher for programming in our solar system🏅🏅🏅🏅🏅🏅🏅🏅⭐⭐❤

sukhnainsingh
Автор

u r so precious! just love the way u teach!! u r so kind and intelligent..stay blessed
i wish apke jaise log aur bhi ho. kitni bhi tareef kro aapki kam he hai. you deserve the world man.seriously love ur work and i wish u all the happiness in the world

shalinishrivastava
Автор

This is typical topic, but you explained it in such a nice manner, most of things are clear now... keep making such type of content🤗

DineshSingh-hxkw
Автор

Superb video Sir, but it would be better if you haven't included the virtual base class concept along with the base and derived one... Just a view....Apologies for the mistake(if done).

AmanSharma-xqis
Автор

Tx bhai I am daily watching your videos 😁😁😘😘

And I am learning c++and java script
Apki video dekh kar.

App aise he video banate jaav

I am from India Karnataka 😊😊😊😊

earthmaster
Автор

GOOD MORNING BRO
You are the best
Your explaintions are outstanding! 😍😊👍

codifyDude
Автор

Watched for 2 time and It's clear Now😍🤘

vipulchaudhary_js
Автор

I made a code for both constructor and destructor. I observed that destructors are initializing in the reverse order of initialization of constructors. for constructor - A to B to C, for destructors - C to B to A.

#include <iostream>
using namespace std;

class A
{
public:
int a;
int b;
A()
{
a = 5;
b = 7;
cout << "Sum is " << a + b<<endl;
}
~A()
{
cout<<"A ka khatm"<<endl;
}
};

class B
{
public:
int p;
int q;
B()
{
p = 3;
q = 8;
cout << "Sum is " << p + q<<endl;
}
~B()
{
cout<<"B ka khatm"<<endl;
}
};

class C : public A, public B
{
public:
C(){
int sum = a+b+p+q;
cout<<"Sum of a, c, p and q is "<<sum<<endl;
}
~C()
{
cout<<"C ka khatm"<<endl;
}
};

int main()
{
C c;
}

Sample code

adityasudan
Автор

Thank you sir for providing me free tutorials.

codewithharryfanchannel
Автор

Good morning 🌞 sir ji mi to abhi aap ke flask ki playlist acces kr raha tha 😁 aap ke video ka notification aaya socha gm bol do🙃 u r the best teacher ❣️❣️❣️💞💞💞💞

movieloverss
Автор

commenting for better reach because this guy is awesome

altamashsabri
Автор

Harry Bhai,
You are awesome!
I have just started learning c++, but I want to learn A.I using c++ can i do it? Why no projects in c++?

astronomyflare
Автор

6:03
Now I understand why I was getting error when I tried to make a constructor for the exercise given in tutorial 42

shatviksmit
Автор

jaise jaise age bdh rha hu playlist me bhut mja rha ik ik chij clear ho ja rhi h

divyanshushukla
Автор

Harry bhai i love you❤❤❤❤❤❤❤❤❤ please make a video on your lifestyle 🙏🙏🙏

Jaymahakal-td
visit shbcf.ru