Constructor Overloading In C++ | C++ Tutorials for Beginners #31

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
Рекомендации по теме
Комментарии
Автор

Thanks a lot buddy for making such great content. Kaafi badiya smjhaya hai cheezo ko <3

shivanshbansal
Автор

Just came here to brush up my concepts, but got awestruck by your way of teaching, I've followed your JavaScript playlist, but the way you've explained this is
_/\_ RESPECT++

Virus-kexj
Автор

N also i want to give us the assignmen and test n all then it'll be d perfect course for those who want to learn serisly

hr
Автор

Harry Bhai App Bahut Achha sikhate Ho
Apki all videos helpful hai 😍 😊

bestedmmusic
Автор

Thank you Harry Bhai!! I was actually wondering if Constructor also follows polymorphism!

TheISP
Автор

Thank you sir...❣️❣️
I'm one of your Instagram followers and really I'm a big fan of your style to teach us...❣️❣️❣️
Really great work...🙏🙏😋😋

AbhishekSharma-dvnh
Автор

thank you so are really doing great job.huge respect for you😊

muskansoni
Автор

Bhai tum itne sare languages kaise sikh kar mastery hasil kar sakte ho yar. Amazing i must say.

dheerajchumble
Автор

thank you sir ...
i fall in love with coding
because of this course of yours

lagonitegaming
Автор

Aap thode sad sound kr rhe is wale video me....may god give u all the happiness.... thanks alot...

vaibhavmishra
Автор

awesome coding tutorials keep going on

samirshaikh
Автор

Sir aap bahut acha kaam karte h free m itna knowledge dete h aap video banana band na kariyega sir ... Kiu ki apki coding itni achi h ki aap lakho ka package aaram se pa skte h lekin sir plz aap video banana na band kariyega 🙏

piyushanand
Автор

thank you so much sir for making such great videos for us thanks again

dhairyamehta
Автор

Bhai c# pai vedeo banaw aap bhot achai sai samjatai hain thank u bhai waiting for reply

techandentertainment
Автор

code for distance b/w 2 coordinates
i just made it much lengthy but very easy to understand

#include <iostream>
#include <cmath>
using namespace std;
class pointb;
class pointa
{
int x, y;

public:
void setdata(void)
{
cout << "Enter x coordinate for first point" << endl;
cin >> x;
cout << "Enter y coordinate for first point" << endl;
cin >> y;
}
void getdata(void)
{
cout << "Your first Point is (" << x << ", " << y << ")" << endl;
}
friend float distance(pointa o1, pointb o2);
};
class pointb
{
int a, b;

public:
void setvalue(void)
{
cout << "Enter x coordinate for second point" << endl;
cin >> a;
cout << "Enter y coordinate for second point" << endl;
cin >> b;
}
void getvalue(void)
{
cout << "Your second Point is (" << a << ", " << b << ")" << endl;
}
friend float distance(pointa o1, pointb o2);
};
float distance(pointa o1, pointb o2){
int c= sqrt(pow((o2.a-o1.x), 2)+(pow((o2.b-o1.y), 2)));
cout<<"The distance between two points is "<<c<<endl;
};
int main()
{
pointa a;
a.setdata();
a.getdata();
pointb b;
b.setvalue();
b.getvalue();
distance(a, b);
return 0;
}

krishsharma
Автор

Hi sir big fan please get a series in AI and visual basic

meerapandey
Автор

#include <iostream>
#include <cmath>
using namespace std;
class twopoint
{
int a, b;
friend void distance(twopoint o1, twopoint o2);

public:
int val1(int x2, int y2);
twopoint(int, int); // this is a declaring of conductors
void Showval1(void)
{
cout << "The value of a point is (" << a << ", " << b << ")" << endl;
}
void Showval2(void)
{
cout << "The value of b point is (" << a << ", " << b << ")" << endl;
}
};
twopoint::twopoint(int x2, int y2)
{
a = x2;
b = y2;
}
void distance(twopoint o1, twopoint o2)
{
float dist;
dist = sqrt(pow(o2.a - o1.b, 2) + pow(o2.a - o1.b, 2));
cout << dist << endl;
}
int main()
{
twopoint a(1, 1);
a.Showval1();
twopoint b(2, 2);
b.Showval2();
distance(a, b);
return 0;
}

indianriddle
Автор

Harry bro it will be great if you can just make a video of operator overloading in c++

sanidhyaagarwal
Автор

class Point
{
int x;
int y;
friend Point distanceCoordinates(Point q1, Point q2);
public:
void displayCoordinates()
{
std::cout<< "The coordinates are : " << '('<<x<< ", " <<y << ")" <<std::endl;
}

Point(int a, int b)
{
x = a;
y = b;
}

};
Point distanceCoordinates(Point q1, Point q2)
{
int sumx, sumy;
double tot;
sumx = pow((q1.x + q2.x), 2);
sumy = pow((q1.y + q2.y), 2);
tot = sqrt(sumx + sumy);
std::cout << "The distance between two coordinates is : " << tot <<std::endl;
}
int main()
{

Point p1(0, 1), p2(0, 6), dst(0, 0);
p1.displayCoordinates();
p2.displayCoordinates();

dst = distanceCoordinates(p1, p2);
return 0;
}

Pooh____
Автор

Harry Bhai plz continue the series on web development u have not post any video from last five days?

armanahmed