Operator Overloading in C++ Example 2 | C++ Tutorial | Mr. Kishore

  Рет қаралды 91,749

Naresh i Technologies

Naresh i Technologies

Күн бұрын

Пікірлер: 94
@NareshIT
@NareshIT 5 жыл бұрын
Please Comment, Subscribe and Click Bell🔔🔔🔔 Icon for More Updates. To learn software course from our experts please register here for online training: goo.gl/HIB0wL
@manalisamani6729
@manalisamani6729 5 жыл бұрын
Is this normal operator overloading is also called binary operator overloading, right? I just want to confirm🙂 plzz sir reply And thanks for this amazing explanation 🙂
@queensheba693
@queensheba693 4 жыл бұрын
Best teacher of c++ I have ever seen. Thank you so much sir 🙏
@ironsight6186
@ironsight6186 5 жыл бұрын
Best explanation for + operator overloading on youtube. thank you so much.
@thayalanthayalan5234
@thayalanthayalan5234 2 жыл бұрын
Eventhough taking more time... repeating and enforceing every point again and again gets into our head open our mind... this is super sir and ur teaching is too good..God bless you... thank you
@TheShowgun13
@TheShowgun13 4 жыл бұрын
Definitely one of the best teachers of c++ ,all while using a whiteboard!? Much respect to you sir!
@speedyrax4506
@speedyrax4506 Жыл бұрын
this lecture is the best because of the board...... everything shown in codeblocks goes over my head.... wish i had you as my teacher...
@NithyaShree-lv3my
@NithyaShree-lv3my 9 ай бұрын
the most underrated channel on youtube!!great lectures!!
@kickflicks9683
@kickflicks9683 5 жыл бұрын
Best channel and best lecturer in the KZbin....thank you sir
@priyasuresh7024
@priyasuresh7024 3 жыл бұрын
Great explanation.. thanks a lot sir for free online classes... Even paying classes also not like these classes 🙏🙏🙏🙏🙏👍👍👍👍
@aumkhant5215
@aumkhant5215 4 жыл бұрын
We can also add two strings using string data type directly. Eg. String s1,s2,s3; s3=s1+s2;
@sunitakanharkar1542
@sunitakanharkar1542 4 жыл бұрын
we know that operators works only with predefined data types. In C++ this operator overloading concept is defined to work with user-defined data type. Please note that string is predefined data type but objects are user defined and we are adding two objects. So we can't directly add them.
@aumkhant5215
@aumkhant5215 4 жыл бұрын
@@sunitakanharkar1542 I am telling that we can use string instead of char array in this problem!!
@fxexile
@fxexile 4 жыл бұрын
@@aumkhant5215 The objective (focus) here is to see how operator overloading works. Most of the programmers already know we can do string addition directly.
@aumkhant5215
@aumkhant5215 4 жыл бұрын
@@fxexile yes bro I agree with you
@anjanarajam3459
@anjanarajam3459 4 жыл бұрын
you are the only one in the entire youtube who has explained this concept well. Thank you
@jockergaming6853
@jockergaming6853 10 ай бұрын
i was struggling to under this concept but your two video made this cystle clear
@premav4500
@premav4500 3 жыл бұрын
In depth Explanation.....Nice teaching sir
@dattakhandway7547
@dattakhandway7547 3 жыл бұрын
1 number ...........sir........osm.........................
@prost5514
@prost5514 3 жыл бұрын
thanks a lot, you are perfect as usual, even without computered explanation
@sathibabumedisetti8786
@sathibabumedisetti8786 3 жыл бұрын
Thank you sir. Your explanation is very clear
@srijanmukherjee3648
@srijanmukherjee3648 3 жыл бұрын
excellent explanation
@techdyan8500
@techdyan8500 4 жыл бұрын
you are a good teacher ..sir
@revathi7623
@revathi7623 3 жыл бұрын
Thank u so much sir. Very clear explanation
@udaykumargadikar7909
@udaykumargadikar7909 4 жыл бұрын
Great explanation 👍👍..
@kritikasharma3331
@kritikasharma3331 3 жыл бұрын
excellent explanation sir!!😁
@sanjaymahli7772
@sanjaymahli7772 3 жыл бұрын
Very nicely explained
@anitajadhav3254
@anitajadhav3254 3 жыл бұрын
Thanku sir you are simply great
@ajaykharat8689
@ajaykharat8689 6 жыл бұрын
#include #include #include using namespace std; //operator overloading is using existing operator on user defined datatype(Object,Structure) instead of function or similar to function //existing operator(+,/,*,) operates on pre-define datatype(int, float, char) now using operator overloading existing operator operates on user define datatype (Object, Structure) //Always L.H.S object must be implicit object of same class and R.H.S object must be explicit. This rule is true for both 1. using function 2. using operator overloading. class ajay { int a; public: void getdata() { couta; } void add(ajay a2) { cout
@karthikeyan-lv6wu
@karthikeyan-lv6wu 4 жыл бұрын
good but it is simple addition u made it more complicate. matrix addition is best one for + operaor M3 = M1 + M2; where M1, M2 are matrices.......................
@madhukumars458
@madhukumars458 6 жыл бұрын
I got the clear cut difference between implicit and explicit objects
@happysai9119
@happysai9119 3 жыл бұрын
A builder started the construction of their two buildings on the same day and completed at different day. Develop an OOP to perform the comparison on their completion date and find the earlier completion date and later completion date by overloading the < and/or > operator. Assume the difference between the two completion dates may be more than a year. Need ans plsss
@kvkmtech
@kvkmtech 6 жыл бұрын
Thank you to kishore sir and naresh technologies
@sahdevchandraswarnakar4549
@sahdevchandraswarnakar4549 6 жыл бұрын
You are great,,, Sir
@suryanshs3079
@suryanshs3079 6 жыл бұрын
Well explained!, Please keep uploading more vedios sir
@ankushjain3683
@ankushjain3683 6 жыл бұрын
Its awesome...:) clearly understood.
@riturajanand7133
@riturajanand7133 5 жыл бұрын
sir if I use 2 strcpy() and 1 strcat() then I don't get desired result i.e both string will not get copied
@behindthescene4406
@behindthescene4406 4 жыл бұрын
How u are using copy fcn... n concatenation fcn
@desihiphop4998
@desihiphop4998 3 жыл бұрын
exactly bro same problem have u resolved it ???
@jayanthbharadwaj2041
@jayanthbharadwaj2041 4 жыл бұрын
Excellent Sir
@vishalbhardwaj8577
@vishalbhardwaj8577 4 жыл бұрын
jatt da ni muqabla sirra teacher
@chahatvamdev4088
@chahatvamdev4088 3 жыл бұрын
Amazing Sir
@manjubpillai447
@manjubpillai447 5 жыл бұрын
Good explanations sir.
@senthilk8375
@senthilk8375 3 жыл бұрын
Thank you sir 🙏
@ГерриПитт
@ГерриПитт 5 жыл бұрын
Thanks for the videos!
@rakshithasiddaramaiah2617
@rakshithasiddaramaiah2617 4 жыл бұрын
Here in operator declaration we're using (Test T2) and while Calling the main fiction the object T1 is not assigned how will the compiler consider T1 as implicit value in operator definition?
@vsarts1967
@vsarts1967 4 жыл бұрын
This is a rule.always L.H.S object must be implicit object of same class and R.H.S object must be explicit.(valid for using function ,using operator overloading )
@erankishashank2839
@erankishashank2839 4 жыл бұрын
Are you aware about "this" pointer?
@erankishashank2839
@erankishashank2839 4 жыл бұрын
The compiler takes it this way : In add function argument Test add(test t2) : Test t3 = this->st + t2.st; Where "this" is the pointer to the calling object.
@maheshshirsat9075
@maheshshirsat9075 4 жыл бұрын
what does implicit and explicit object means??
@elijaheinstein160
@elijaheinstein160 6 жыл бұрын
Great Explanation!
@indiacomputers9885
@indiacomputers9885 2 жыл бұрын
Very nice
@kattakarthik306
@kattakarthik306 4 жыл бұрын
can we take object in number fucction because t3 is declared in function right
@nidhirajput810
@nidhirajput810 Жыл бұрын
Salute sir
@sachin6873
@sachin6873 6 жыл бұрын
good explanation sir
@shhhahil
@shhhahil 4 жыл бұрын
Outstanding
@dipjoydebnath1963
@dipjoydebnath1963 4 жыл бұрын
Sir can't we define a sum function and call it in main function by t3.sum()? please do reply
@victorbeemer1873
@victorbeemer1873 2 жыл бұрын
But what are you exactly adding in the sum function? Because you haven't passed any argument , you are just calling the function for the object t3. Could you be more specific?
@rajaranganathan2467
@rajaranganathan2467 4 жыл бұрын
Super sir.
@daviskollannoor1442
@daviskollannoor1442 6 жыл бұрын
numbering the lessons serially will help those wishing to learn systematically... can we look forward to numbered lessons
@basudevnath7977
@basudevnath7977 6 жыл бұрын
Sir pls demonstrate how to overload new and delete operator
@venkateshbavirisetty4239
@venkateshbavirisetty4239 6 жыл бұрын
seriously ur super
@JagguBhai9580
@JagguBhai9580 5 жыл бұрын
why don't we need to overload "="operator in t3=t1+t2; statement
@the_confusedguy
@the_confusedguy 5 жыл бұрын
assignment operator '=' works for objects.There is no need to to overload '=' operator for objects. It will copy the contents of t1+t2 to t3 data member by member
@saivaraprasadpasupuletilvn4412
@saivaraprasadpasupuletilvn4412 5 жыл бұрын
Can anyone tell me why it is giving error at test t2
@bhumitrakhadka6633
@bhumitrakhadka6633 4 жыл бұрын
Because u dont know to type
@saivaraprasadpasupuletilvn4412
@saivaraprasadpasupuletilvn4412 4 жыл бұрын
@@bhumitrakhadka6633 OMG thankyou for the reply it's very quick and really helpful 😎
@victorbeemer1873
@victorbeemer1873 2 жыл бұрын
@@saivaraprasadpasupuletilvn4412 haha lol
@programmingworld8946
@programmingworld8946 4 жыл бұрын
Sir i think you have experience of 20 to 25 year of teaching😇😇😇😇😇😇
@rashidakhatun7437
@rashidakhatun7437 6 жыл бұрын
Thanks
@7sinsganiftw877
@7sinsganiftw877 2 ай бұрын
why dont he use string data type directly when we have string data type in c?
@sonu-uq1um
@sonu-uq1um 6 жыл бұрын
hello sir can you upload the videos of java
@azharjamali7485
@azharjamali7485 5 жыл бұрын
give example of adding three or more objects
@prasadsolleti3870
@prasadsolleti3870 4 жыл бұрын
when i tried to print the string it is printing only second sting but not first .can anyone please help me
@techdyan8500
@techdyan8500 4 жыл бұрын
if you follow his step ..it will definitely works ..please check the code once
@suhailsama5195
@suhailsama5195 Жыл бұрын
bro you are using strcpy function in strcat i am doing same
@viswanathgupta7406
@viswanathgupta7406 7 жыл бұрын
add function overloading sessions sir
@rahularora37
@rahularora37 4 жыл бұрын
fk maza agya
@viththaldeshpande875
@viththaldeshpande875 2 ай бұрын
Thank you very much sir for your nice explanation!
@ajaykharat8689
@ajaykharat8689 6 жыл бұрын
#include #include #include using namespace std; //operator overloading is using existing operator on user defined datatype(Object,Structure) instead of function. //existing operator(+,/,*,) operates on pre-define datatype(int, float, char) now using operator overloading existing operator operates on user define datatype (Object, Structure). //Always L.H.S object must be implicit object of same class and R.H.S object must be explicit. This rule is true for both 1. using function 2. using operator overloading. class ajay { int a; public: void getdata() { couta; } void operator +(ajay a2) { cout
@chahatvamdev4088
@chahatvamdev4088 3 жыл бұрын
Amazing Sir
@sushilgyawali7880
@sushilgyawali7880 3 жыл бұрын
Thank you 😊 .sir
@sharifkhan9170
@sharifkhan9170 4 жыл бұрын
you are great sir
@iniyaviji2796
@iniyaviji2796 Жыл бұрын
Thank u sir
@edsword9071
@edsword9071 4 жыл бұрын
Thanks
Overloading Unary Operator in C++ | C++ Tutorial | Mr. Kishore
14:39
Naresh i Technologies
Рет қаралды 70 М.
Operator Overloading in C++ Example 1 | C++ Tutorial | Mr. Kishore
31:48
Naresh i Technologies
Рет қаралды 229 М.
Арыстанның айқасы, Тәуіржанның шайқасы!
25:51
QosLike / ҚосЛайк / Косылайық
Рет қаралды 700 М.
Friend Function in C++ Part 1 | C++ Tutorial | Mr. Kishore
17:38
Naresh i Technologies
Рет қаралды 168 М.
Multiple Inheritance in C++ | C++ Tutorial | Mr. Kishore
18:18
Naresh i Technologies
Рет қаралды 76 М.
Constant Members in Class | C++ Tutorial | Mr. Kishore
20:04
Naresh i Technologies
Рет қаралды 55 М.
Operator Overloading using Friend in C++ | C++ Tutorial | Mr. Kishore
15:46
Naresh i Technologies
Рет қаралды 78 М.
C++ Programming All-in-One Tutorial Series (10 HOURS!)
10:28:15
Caleb Curry
Рет қаралды 2,3 МЛН
Constructor Introduction, Default Constructor in C++ | C ++ Tutorial | Mr. Kishore
19:37
Friend Class in C++ Example 1 | C++ Tutorial | Mr. Kishore
15:05
Naresh i Technologies
Рет қаралды 100 М.