Parameterized and Default Constructors In C++ | C++ Tutorials for Beginners #30
Вставка
- Опубліковано 18 жов 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
►For Doubt Solving, Brain Storming Sessions & guaranteed replies, join the channel membership here: / @codewithharry
►Click here to subscribe - / @codewithharry
►Checkout my English channel here: / programmingwithharry
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
you are the best teacher sir!
//code for parametric constructor to find distance between x-coordinate and y-coordinate :
#include
#include
#include
using namespace std;
class Point
{
int x, y;
friend void distance(Point, Point);
public:
Point(int a, int b)
{
x = a;
y = b;
}
void display_point()
{
cout
Distance between 2 points:
void distance(point p, point q){
int r = abs(p.x-q.x);
int s = abs(p.y-q.y);
float m = sqrt(r*r+s*s);
cout
//create a function which takes two point objects and computes the distance between those two points
//Hint :make it a friend function
#include
#include
using namespace std;
class point{
int x ,y ;
friend void distance(point o1 ,point o2 );
public:
point (int a ,int b){
x=a;
y=b;
}
void display(){
cout
correct one
Same code Dalal ni chla nalle
thanks
Thank you for the help...
It really helped a lot..
May god bless you 🙏
if we want that user should tell us the points, what would be the code changes in int main then ?
Harry Bhai ekdum mast samajh aa gaya! saare concepts ki complete practice ho gayi.
I did the distance between two poitns all by myself after encountering some errors and i am very happy about it.Thank you very much😭😭😭😭😭😭😭😭😭😭😭😭😭😭
Rota kahe ko h ye le chocolate kha
@@पापीगुडिया-ह3ढ papi gudiya bhag ja bache ko rulati hai😡
Rahul bro isse chocolate 🍫 nhi lena
@@ak689 rahul ko to kabka chocolate 🍫 de diya ab teri baari h chote
Haahaaahaahaaaa..............
@@पापीगुडिया-ह3ढ om phatt swaha
bhag ja yaha se👻
@@पापीगुडिया-ह3ढ tere chocolate Dene se kuch nhi hoga bhag yaha se verna ham sab coder bhga bhaga ke mare ge
Finally Harry Bhai ko "tempcoderunner" wale error ka reason smj aa gya 😅... Btw... He is the best in his field 🙌🏻❤️
First time i did something by myself. It takes little more time but I'm very happy. Thank you harry sir
I did it 🙏.
Firstly I thought that I couldn't do this but I said to myself let's give it a try.
And Maine kar liya with god's grace.
Thanku so much sir for providing us immense knowledge for free.
❤️
Main Logic
Without Using Friend Function .......
Public:
Point(int,int,int,int);
void Printdata()
{
cout
Thanks
// Parameterized Constructor using Friend Function Example :-
#include
#include
using namespace std;
class point{
int x,y;
friend void distance (point , point);
public:
point (int a,int b){
x=a;
y=b;
}
void displayPoint(){
cout
diff ko int kyu define kiya , double would have been better , isn't it?
😘
@@ankitjha.23 mwah mwah baby
Bhai garbage value kyu aari
if you write return type of "diff" variable as float then it will be better.
great way of explanation i am enjoying them a lot thank you so much
The smallest and the easiest way :-
Function will be like this (Just make this function as a friend in the class) :-
void distancePoint(Point obj1, Point obj2)
{
double dis;
dis = sqrt(pow((obj2.x - obj1.x), 2) + pow((obj2.y - obj1.y), 2));
cout
Abe bhai constructor ka use to kiya ni tumne.... 😂
Aise to sbko pta h aasan h
Bhai point class kaha gyi tere program ki
Bhai
displaypoint()
function kaha hai
I have used both method 1> just by declaring a function to calculate distance 2> using friend function
#include
using namespace std;
class point{
int x,y;
public:
point(int a,int b){
x=a;
y=b;
}
// ---> Normally
// float dis(point p, point q){
// int ans=pow(abs(p.x - q.x),2) +pow(abs(p.y- q.y),2) ;
// return pow(ans,0.5);
// }
friend float dist(point ,point);
};
// using function as friend
float dist(point p, point q){
int ans=pow(abs(p.x - q.x),2) +pow(abs(p.y- q.y),2) ;
return pow(ans,0.5);
}
int main(){
point a(0,0);
point b(4,3);
//cout
Quiz1:
Distance b/w 2 Points
#include
#include
using namespace std;
class point{
int x, y;
friend void distance(point, point);
public:
point(int a, int b){
x = a;
y = b;
}
void display(void){
cout
Nice brother
This can be done without including cmath file, we can make use of babylonians method for sqrt
Harry bhai sab tutorial mein ek ek single example add kar do n bahut bahut meharbaani hogi aise aap jitna diye wahi main repeat karke dekhunga ho jayega
first we want to include the heterofile(#include)
double distanceTo(point otherPoint)
{
return sqrt(pow(otherPoint.x - x, 2) + pow(otherPoint.y - y, 2));
}
you are great bro, Thanks vai for this tutoring , It helps me very much
THANK YOU HARRY BHAIYA FOR MAKING THE CONCEPT EASY.
CODE:
#include
#include
using namespace std;
double v;
class point{
int a,b;
public:
friend class dist;
void setPoint(int x,int y){
a=x;
b=y;
}
int displayDistance(point,point);
};
class dist{
public:
int distance(point,point);
};
int dist :: distance(point a1,point a2){
int diff1=(a1.a-a2.a)*(a1.a-a2.a);
int diff2=(a1.b-a2.b)*(a1.b-a2.b);
if (diff1>diff2){
v=sqrt(diff1-diff2);
}
else{
v=sqrt(diff2-diff1);
}
return v;
}
int point :: displayDistance(point a1,point a2){
cout
Thank u soo much bro...
Ur videos really helps me... 🥰
Sir, I think I did it, bdi mehnat lgi but done. Thanks a lot abhi tk itni saari chizein is playlist ke through sikhaane ke liye.
Aoa bro am pakistani aur ma na c++ learn krna tha aur ma ap ka sary lecture Dako ga aur ma na ap ko subscribe be kr Dia thks bro great effort. May you live long
14:25 maine bas aaj tk unhe graph pe banaya tha kabhi distance calculate nhi kri thi isliye ha doosro ke programs ko dekh ke seekh ke bana rha hu aur samjh aa rha hai ki unhone kaise use kiya formula
This video has highest like to dislike ratio(=200) among the videos I have seen on UA-cam. Keep it up!
int main(){
Complex c1, c2, sum;
c1.setNumber(1, 4);
c1.printNumber();
c2.setNumber(5, 8);
c2.printNumber();
sum = sumComplex(c1, c2);
sum.printNumber();
return 0;
}
Answer to the easy quiz.
(For those who don't know these functions which I have used, read this then see the answer.)
To do some basic math operations, we need to import header file .
sqrt function --> It calculates the square root of a number.
pow function --> It calculates the exponent of a number. It takes two parameters - the number to be powered and the power which has to be raised to that number.
The code for the answer to this quiz:
#include
#include
using namespace std;
class Point{
int x, y;
friend float distance(Point, Point);
public:
Point(int a, int b){
x = a;
y = b;
}
void displayPoint(){
cout
Thanks bro for providing this information😊... By the way you written this code by your own?
@@YashYadvav123 yes
Bro c++ ke notes bna rakhe h pdf file chaiye thi ?
@@jee6455 bhai maine itni mehnat se bnaye hai aise hi kaise dedu
@@naman1312 ohk
int finddistance(point a, point b){
int res = sqrt(pow((a.x-b.x),2)+pow((a.y-b.y),2));
return res;
}
Thank you sir for this amazing and easy lecture
#include
using namespace std;
class sum{
int a, b;
public:
sum(int x ,int y){
//object name is goven while creating object
a=x;
b=y;
cout
Distance between two coordinate points:
#include
#include
using namespace std;
class Point
{
int x, y;
friend int Distance(Point, Point);
public:
Point(int a, int b){
x = a;
y = b;
}
};
int Distance(Point o1, Point o2){
int x_diff = (o2.x-o1.x);
int y_diff = (o2.y-o1.y);
int diff = sqrt(pow(x_diff,2)+pow(y_diff,2));
return diff;
}
int main(){
Point p1(1, 1), p2(1,1);
cout
int diff = sqrt(pow(x_diff,2)+pow(y_diff,2));i
isme ,2 kyu use kara hai?
@@rahilpanwar5999 kyuki formula me square karte hai
√((x2-x1)² + (y2-y1)²)
To pow(xdiff,2) ka matlab wahi hai
(x2-x1)²
Thank you so much harry bhai
Because of you I am able to understand the concepts of OOPS so easily!
I made that function before you asked to . Also i took point in 3D space.
float dist(Point p , Point q){
return pow(pow(p.x - q.x , 2) + pow(p.y - q.y , 2) + pow(p.z - q.z, 2) , 0.5);
}
though i used pow lol
thank you bhai
// Program to calculate the distance between two cartesian points
#include
#include
using namespace std;
class point
{
int a,b;
public :
void setvalue (int x,int y)
{
a =x; b=y;
}
friend int distance (point A,point B);
};
int distance (point A,point B)
{
float c = sqrt ((A.a- B.a)*(A.a- B.a)+ (A.b- B.b)*(A.b- B.b));
return c;
}
int main()
{
int x,y;
cout > x>>y;
point C,D;
C.setvalue (x,y);
cout > x>>y;
D.setvalue (x,y);
int c =distance (C,D);
cout
Bro your return type of distance should be float
graaappppeeeeee
// Function to compute distance between two points
float calculateDistance(Point p1, Point p2)
{
return sqrt(pow(p2.x - p1.x, 2) + pow(p2.y - p1.y, 2));
}
do it by using classes
program for getting the distance between two points:-
//this is a program for getting the distance between two points using constructor and math function
#include
#include
using namespace std;
class point{
int x , y;
public:
friend int distance(point o1,point o2);
point(int , int );
void display(){ // we can define the constructor here also
cout
#include
#include
using namespace std;
class point{
int x,y;
public:
point(int a, int b){
x=a;
y=b;
}
void printpoint(){
cout
Harry bhai, challenge or quiz accepted, here is my fully-functional code to print distance the two points wherein I have tried to utilise the concepts of parametrised constructor, friend function and even explored some new mathematical functions in the c++ standard cmath library. btw, here is my code:
#include
#include
using namespace std;
class geometry{
int x,y;
public:
// parametrized function to initailize the value of the variables
geometry(int a, int b){
x = a;
y = b;
}
// print_point() : to print the formed point.
void print_point(){
cout
My answer 😀 :
Answer to the easy quiz.
(For those who don't know these functions which I have used, read this then see the answer.)
To do some basic math operations, we need to import header file .
sqrt function --> It calculates the square root of a number.
pow function --> It calculates the exponent of a number. It takes two parameters - the number to be powered and the power which has to be raised to that number.
The code for the answer to this quiz:
#include
#include
using namespace std;
class Point{
int x, y;
friend float distance(Point, Point);
public:
Point(int a, int b){
x = a;
y = b;
}
void displayPoint(){
cout
Your coding skills improve my skills
harry bhaiya boht kuch sikhne mil raha hai.... thank you
best tutorial on C++
#include
#include
using namespace std;
class quiz{
int a,b;
public:
void give( int x ,int y ){
a=x;
b=y;
}
friend void diff(quiz,quiz);
};
void diff(quiz o1, quiz o2){
int c,d;
c=(o2.a-o1.a)*(o2.a-o1.a);
d=(o2.b-o1.b)*(o2.b-o1.b);
cout
float distance (point m,point n)
{
float z=sqrt ((n.x-m.x)*(n.x-m.x)+(n.y-m.y)*(n.y-m.y)
Cout
Thank you so much
project completed succesfully
float distance(Point o1, Point o2)
{
float d = sqrt(pow(o2.x - o1.x, 2) + pow(o2.y - o1.y, 2));
return d;
}
Hello harry vai,
I am from Nepal . It has been all most 2-3 weeks learning python from your python playlist . The project that you have done are very appreciable,hands off for that but you have missed an important project of python and i.e. Face recognition system . I hope you will make an tutorial video for it . And thanks for sharing your knowledge and experience with us .....
God Bless you .
yes I support
Heyy budd, tell your pm oli that
He is gonna destroy your country
@@mukeshkashyap1279
Are you learning programming to discuss these shit things on the comments section .
As my observations, oli keeps vomiting shits from his mouth on International topics which every Nepali knows, BUT inside the country there has been a lot of developmental in his governance .
@@mukeshkashyap1279 STFU
14:33 Done
Hi Harry Bhai.......... Thank you so much .....I'm in class 8 but coding mein bahut interest hai.......ek bar khatam ho Jaye phir dhammal mach jaye
Mcha Di dhmaal phir
iam in nursery...iam also very interested in coding ...dhamkal mcha denge
I have born today just 368584744351799....micro second ago..... I am also very interested in coding....dhamaal macha denge.
im have just died abhi 4 th dimension me hu,i am also very interested ek baar janam lelu phir dhamal macha denge
//quiz - a function which takes two points and computes the distance between
//make it a friend function
//following program doesn't need constructor
#include
#include
using namespace std;
class point
{
int a;
int b;
friend float distance(point , point);
public:
void coordinate(){
cout
// This program is written by using the concept of friend function, parameterized constructor.
// This program is valid for any point as it takes point as an input from the user.
#include
#include
using namespace std;
class point
{
private:
int x;
int y;
public:
friend void distance(point, point);
point(int a, int b);
void getpoint(void)
{
cout
Run ho gya thanks 😊
thanks for this videos
Program:----
#include
#include
Using namespace std;
Class point{
Int x,y;
Public:
point(int a,int b){
x=a;
y=b; }
Void display (){
Cout
Nice
A slight mistake here u put some words capital like Class but it should be class and same with Using,int,court...
@@FANSasFRIENDS bro I know but thing is concept clear hona chahiye syntax error to aaram se theek ho sakta hai
@@prashantmajumdar1519 bro how you done this because I m not able to do this in first attempt So can u guide hiw you can understand his vedio plz bro
@@Rohan-ov3fr bhai itna kuch nahi hai bass consistent raho and maine ye playlist bohot focus rehke follow kia hai to mujhse ho gaya I will suggest you to solve atleast 2-3 coding problem per day to increase your problem solving skill
void Distance(Point c1, Point c2){
float c = sqrt(pow(((c1.x)-(c2.x)),2)+pow(((c1.y)-(c2.y)),2));
cout
I think friend function ki zaroorat nahi hai:
// a member function to compute the distance between two poins
double computeDistance(Point new_point)
{
double d;
d = sqrt(pow((Point::x - new_point.x), 2) + pow((Point::y - new_point.y), 2));
return d;
}
int main()
{
// driver program
Point p(1, 1);
p.displayPoint();
Point q(4, 6);
q.displayPoint();
cout
I didn't understand that -->"d = sqrt(pow((Point::x - new_point.x), 2) + pow((Point::y - new_point.y), 2)); ".
What does that *Point::x - new_point.x* means?
@@kushal6065 we are computing Euclidean distance...which means square root of sum of squares of component wise subtraction
Now every point is my friend😊
#include
#include
using namespace std;
class vector
{
int x,y;
public :
vector(int,int);
void dis(void);
friend void distance(vector o1,vector o2);
};
vector ::vector(int a,int b)
{
x=a;
y=b;
}
void vector::dis(void)
{
cout
My code is correct and I can't believe it
solution of question---
#include
#include
using namespace std;
class point{
int a,b;
friend void distance(point o1, point o2);
public:
point(int x , int y);
void display(void){
cout
My code:
// Exercise question
// Create a function (hint:make it a friend function) which takes two point objects
// and computes the distence between those two points
#include
#include
using namespace std;
class point
{
int x, y;
public:
friend void distance(point o1, point o2);
point(int num1, int num2)
{
x = num1;
y = num2;
}
void display()
{
cout
u should have used float for distance
function overloading makes it more efficient Nice
bro you forget to apply forward declaration.
bhai float distance use kare to perfect value milega
Awesome explanation..
Begineers easily understood ur language .but a little bit problem is present in your video that is your example to explain..In your video u will take only mathematical example which easily understood by a math background students ...but it's so hard to understood by a non math student...so plizz sir took some easier example to teach....
first bhai heart dedo.. Python playlist complete hone wali h
// create a function which takes two point object and computes the distance between those two points
// Hint: make it a friend function
#include
#include
using namespace std;
class point
{
int x;
int y;
public:
point(int, int);
friend void distance(point a, point b);
};
point::point(int u, int v)
{
x = u;
y = v;
}
void distance(point a, point b)
{
int n1 = (b.x - a.x);
int n2 = (b.y - a.y);
cout
Harry bhai always best👍💯 💞
// by taking inputs from user calulating distance between two points.
#include
#include
using namespace std;
class input //taking inputs from users
{
int x1;
int x2;
int y1;
int y2;
friend void distance(input );
public:
input()
{
couty1;
couty2;
}
};
void distance(input a1)
{
float pdiffx=pow((a1.x2-a1.x1),2);
float pdiffy=pow((a1.y2-a1.y1),2);
float tdis=sqrt(pdiffx+pdiffy);
cout
Hello, I'm from Pakistan.
I have 2 Questions..
1. Python k hawaly se kafi videos YT per uoload hain, jin may aap ka bhi kafi contribution hay, sub coding sekhatay hain Laken abhi tak kisi ne nahi bataya keh jub hum coding ker k Koey program bana daitay hain, tho os KA .exe file kaisay banatay hain, our doosray computer may kaisay apnay software ya Program ko install karay.
2.kia aap Koey aisa program, software, vba, excel sheet, bana saktay hain jis may hum kuch data enter karay our wo Autocad may draw ya plot ho jaey..
Kafi programmers ko msg our comment kia but abhi tak kisi ne reply nahi kia. Shayad aap bhi aisa na ker sako... ❤️
Nice job ❤
// parameterized constructors
#include
#include
using namespace std;
class point{
int x;
int y;
public :
friend void difference(point , point);
point(int a, int b){
x=a;
y=b;
}
void displaypoint(){
cout
Thanks for the code
Thanks
instead of multiplying twice for square you can use pow() fuction in .
@@harshvardhanbajpai7846 yas
cout
/*
Create a function which takes 2 point objects and computes the distance between those points
*/
#include
#include
using namespace std;
class Point{
int x,y; // Private members
// Making distanceBetweenPoints as a friend of class Point. So, that we can access the private members of the class Point.
friend double distanceBetweenPoints(Point,Point);
public:
// Default constructor
Point(void){
x = 0;
y = 0;
}
// Parameterized Constructor
Point(int a, int b){
x = a;
y = b;
}
// Function declaration
double distanceBetweenPoints(Point , Point );
void displayPoint(){
cout
I like your spacious way of writing code
xd distance wala question khud se hogya 🥺💖 ily harry
it's interesting to see how video by video views are decreasing...lol ...only serious people left...dammm
Thanks sir
The answer of quiz -->
#include
#include
using namespace std;
class Point{
int x, y;
friend int distance(Point, Point);
public:
Point(int a, int b){
x = a;
y = b;
}
void displayPoint(void){
cout
Bhai boht mast code hai 😍👍
8:50 tbc
Thank you Harry Bro ❣️
The solution for to find the distance between:
float distence(Points p, Points q){
float result;
result = sqrt((((q.x)-(p.x))*((q.x)-(p.x))) + (((q.y)-(p.y))*((q.y)-(p.y))));
return result;
}
This will give the exact value of the distance between points.
Thank You!
Thank you, Harry bhai!
Can u suggest me a laptop for programming and further use android development and for after effects .
price range?????
My suggestion is only for pc setup.
@@karanpreet_8174 20000 - 25000
Thanks Harry Bhaiya
//finding distance between two points using friend function
#include
#include
using namespace std;
class Point
{
int x, y;
public:
Point(int a, int b){
x = a;
y = b;
}
void displayPts(){
cout
Ya same program letus C book mai bhi hai
@@satender1616 bhai pr meine toh khud hi code kra hai ,baki ap us book mei se krlo agr same hai toh
Distance Between two Points :
#include
#include
using namespace std;
class Complex{
private :
double a, b;
public :
// Complex(void)); // Default Constructors
Complex(int , int); // Parametrized Constructors
void printNumber(){
cout
12:19
//More examples of Parameterised Constructors
#include
#include
using namespace std;
class Point{
int x, y;
friend float distance(Point, Point);
public:
Point(int a, int b){
x = a;
y = b;
}
void pointDisplay(){
cout
13:09 ye kaisa formula de diye bhaiya😵
// Create a function which takes two points objects and compute the pointe between those points
#include
#include
using namespace std;
class pointe{
private:
int x;
int y;
public:
friend float pointe_compute(pointe e1,pointe e2);
pointe(int x1,int y1){
x=x1;
y=y1;
}
};
float pointe_compute(pointe e1,pointe e2){
int x1=e1.x;int x2=e2.x;int y1=e1.y;int y2=e2.y;
float sub1=pow(x2-x1,2);
float sub2=pow(y2-y1,2);
float fin1=sqrt(sub1+sub2);
return fin1;
}
int main(){
pointe r1(1,3);
pointe r2(7,6);
float a=pointe_compute(r1,r2);
cout
can we dont directly use function inside the class instead of using friend function
12:38
//! A Slightly Alternate Solution.
#include
#include
#include
using namespace std;
//+ Practice Question
//*Q.Create a function which takes 2 point objects and computes the distance between those 2 points.
class Point
{
private:
int x , y;
friend float distanceCalculator(Point , Point);
friend void diplayPointDistance(Point , Point);
public:
Point(int a , int b)
{
x = a;
y = b;
}
void displayPoint()
{
cout
Distance_between_two_points
Easy Method :
#include
#include
using namespace std;
class point
{
int x, y;
friend void distance_between_two_points(point, point);
public:
point(int a, int b)
{
x = a;
y = b;
}
void DisplayPoints()
{
printf("The point is (%d + %d)
", x, y);
}
};
void distance_between_two_points(point p, point q)
{
double distance = sqrt((pow((q.x - p.x), 2)) + (pow((q.y - p.y), 2)));
cout
Outro is really nice...
10:30 interent mera aa nhi rha hai mai game khelunga lol :)
Isi comment k liye to vdo pause kr k aaya hu xD
Thankyou harry bhai so much
Sir please post the solution of the quiz you gave us 🙏🏻
You want the answer of this quiz
@@HarmonyExplorer yes bro
??????
@@HarmonyExplorer Yess bro plz plz send me I am stuck on that for more than an hour
Output k sath
i have done solved this quiz in two ways ::
1... by using constructurs
#include
#include
using namespace std;
class Point
{
int x, y;
friend Point net(Point p, Point q);
public:
Point(int a, int b)
{
x = a;
y = b;
}
void distance()
{
float ans = sqrt(x * x + y * y);
cout
Kal se boards start hai mera.. to bhai ye 28th tak channel pe active nahi reh paunga bhai. Uske baad dhoom machaunga♥️
Rohan das ...sir ka bhai h kya?????????
@@anoopkumarshukla6808 no, but he is active viewer who is connected form the very starting with harry bhaii
C++ Vs Java for competitive programming?
C++ obvious
C++ because java is heavy
And compilation of codes in c++ is more faster than java
C++ because it's syntax is shorter than java it is faster than java
lol obviously C++
I did it in a different way where we can call value .
//This is a program on how to calculate a distance of coordinate points using class
#include
#include
using namespace std;
class point{
int a;
int b;
int count;
friend void distance(point , point);
public:
void setdata(void){
cout
Assalamualaikum, Harry Bhai
Bhai aap ek konsa CPU lena best programming ke liye aur Gaming ke liye aur youtube purpose live streaming ke liye pls Isper ek video na bhai....
minimum i3 processor ke sath 4gb ram
Quad core i5 with 8 gb ram + 2-4 gb GPU or AMD ryzen r5 with 8 gb ram + 2-4 gb GPU.
Solution:
void printDistance(Point a, Point b){
cout
When you will give solution of your question
I have answer...
@@saquibkhan2107 yha post kr bhai
25000 budget me konsa cpu badia rahega harry bhai...
I already have monitor.
Ryzen 3400g
I did the distance question after more than 8 errors thank you harry bhaiya😇
11:59 yahan pe ye kyu ro raha hai ...xD lol
//Creating a function which takes 2 point objects and computes the distance between thoe 2 points:
//(Hint: Make it friend function)
#include
#include
using namespace std;
class Point{
int x,y;
friend void distancePoints(Point o1, Point o2);
public:
Point(int a, int b){
x = a;
y = b;
}
void displayPoint(){
cout