Sir aap bahut galat kaam kar rahe hai. Itna achha mat padhaiye. Hame sirf aapke video hi samajh aate hai. agar kisi topic par aapka video nahi bana hai to samajhane me bahut takleef hoti hai. Seriously BEST COACH I ever seen in my life. Keep it up.
@madhusudanpatil3509
4 жыл бұрын
Sir, this is what I have coded for class to class type conversion using casting operator.. please, check it once... however output is correct I have done using code blocks # include using namespace std; class item { private : int m,n; public: void setm(int x) {m=x;} void setn(int y) {n=y;} void showdata() {cout
Thanks a lot Man !!! You should edit this command and add space between some lines for better understanding
@suryapratapsingh6801
4 жыл бұрын
Use of Casting Operator. #include #include #include using namespace std; class item { private: int a,b; public: void setData(int x,int y){ a=x; b=y; } void showData(){ cout
@easylife2482
3 жыл бұрын
How can you call set(m) by items object
@suryapratapsingh6801
3 жыл бұрын
@@easylife2482 In this code are not able to only set(m) but you can do make some changes in gater and seter.
@sunnybherwani5912
2 жыл бұрын
Suryapratap singh you have infinite knowledge. You are brilliant genius God father of Albert einstein
@PAWANKUMAR-el2zk
4 жыл бұрын
Thankyou sir your explanation is unique and awesome !! I think U are the one of the most good explainer sir really !! 👍
@vakhariyajay2224
2 жыл бұрын
Thank you very much. You are a genius.
@GAUTAMKUMAR-or7rh
4 жыл бұрын
Sir, product class ke members ko access karne ke liye item class me friend function bana sakte hai kya.....? Humlog constructor ko hi friend function bana sakte hai product class ke liye. Ref. Lecture 12 part 6
@maheshsirsat1811
4 жыл бұрын
haa bro hojata he
@maheshsirsat1811
4 жыл бұрын
mera success hogaya
@akmfaisal6463
8 жыл бұрын
I'm very thankful to you, I learned a lot from your videos. Can you please make 1 video for Dynamic casting..
@alokranjansrivastava623
4 жыл бұрын
We can use parameterized constructor of item class to perform operator casting. i1 = p1; // p1.operator Item(); In Product class operator Item() { Item temp(m,n); return(temp); }
@shubhamshrivastava8649
4 жыл бұрын
Thankyou so much sir. I was thinking about how we can do it by making the whole class as Friend Function and then accessing member variables through dot format, but in this case we need to have Arguments of that class which is not possible in Casting Operator.
@SaurabhKumar-uw2tc
2 жыл бұрын
Very nice lecture line by line ploblem solve coding through thanku sir g
@KirtanPatel552
2 жыл бұрын
graet explation sir_____thank you
@hamdanali631
4 жыл бұрын
humne constructor main Product ka hi object bna diya h sir isme hmen Product ka refernce varible nai bnaaa skte the kya aesa krne pr ek constructor or bn jayega
@illumniaphotographics6312
Жыл бұрын
great video !
@shrishchamoli
8 жыл бұрын
thanks sir for the amazing explanation
@sagarojha3491
6 жыл бұрын
sir please make a video on static and dynamic casting, I am confused in early binding problem because of these topics.
@goutamnagpal3912
5 жыл бұрын
By Casting operator for reference . #include using namespace std; class product; class Item { int a,b; public: Item() {} void PutA(int a) { this->a = a; } void PutB(int b) { this->b = b; } friend void show(Item ,product ); }; class product { int a,b; public : product() { cin>>a; cin>>b; } operator Item() { Item I; I.PutA(a) ; I.PutB(b); return I; } friend void show(Item ,product ); }; void show(Item I,product P) { cout
@akshayjyani5362
3 жыл бұрын
thanks bro your code is useful for me.....
@krishnakrmahto97
6 жыл бұрын
Sir, product data members can be accessed within a function (and also a constructor) if an object of that class is passed as an argument to that function..so, here it would have worked without getM() function.
@pragyasengar8573
3 жыл бұрын
its so fun to study from Saurabh Sir, Sir you're doing great ! coding seems like exploring !
@kamaldakshkrishnan9990
Жыл бұрын
Perfection
@vinodhemsworth9379
2 жыл бұрын
what a pleasure to learn from you!!!!!
@TusharSrivastav21
4 жыл бұрын
Thank you sir for such a wonderful lecture.... 😊😊😊
@kartickchandramanna267
2 жыл бұрын
Awesome Lecture 👍 Thank you sir 🙏
@purnaamdoli3722
7 жыл бұрын
sir make a video on casting operator also
@rishabhtripathi5530
7 жыл бұрын
please upload the video of clas to class conversion using casting operator
@pratikpandey3651
3 жыл бұрын
#include using namespace std; class item { int m,n; public: item(){ } item( int a,int b) { m=a; n=b; } void show() { cout
@hammadabbas7324
3 жыл бұрын
@@pratikpandey3651 Brother Can you explain your code? It's urgent
@rajamehran5387
7 жыл бұрын
thank you very much...all of your helped a lot sir...thanks i hope more videos about the programming language will be added in the future
@sakshiagarwal3666
9 жыл бұрын
best explanation thank u sir
@hello_shum
6 жыл бұрын
operator item ( ) { item temp; temp.a=i2.m;// i think i am doing sth wrong here ? temp.b=i2.n; return(temp); } now in main() { item i1; product i2; i2.setData(3,4); i1=i2;// i1=i2.operator int(); just to revise i1.showData(); } Is it correct sir, for casting operator. or should i have to use member function to get the value of a and b in line no:4 and 5. Please help. Nahi to neend nahi ayegi sir. :) Regards.
@alroygama6166
5 жыл бұрын
You didn't sleep for a year?🧐
@PramodYadav-il2gk
5 жыл бұрын
#include #include using namespace std; class item { int a,b; public: void showdata() { cout
@devrajkumar3413
2 жыл бұрын
Why we are not passing the reference of Product object ? It should ideally get into trap of creating object of Product class each time ?
@suryabhusal1527
7 жыл бұрын
Your Explanations are great sir.
@ajr1791ze
5 жыл бұрын
we can eliminate default const. error using item i1 = p1 in the fiirst line itself rather than assigning it explicitly.
@anirajsoni300
5 жыл бұрын
sir, the line " i1=p1;" should call the implicit copy assignment operator created by compiler ,not the copy constructor but why it is calling copy constructor ? i have checked for same class object , it calls the assignment operator not copy constructor
@sudipsen3677
3 жыл бұрын
Nice explanation
@gigachad6844
2 жыл бұрын
We can use friend function to get values of m and n
@believeinpractical3930
3 жыл бұрын
Awesome
@gurpritsingh2355
4 жыл бұрын
Thank you sir. you are just great.
@axc4280
5 жыл бұрын
Sir.. Casting Operation me ..Private member ko value dene k liye access kaise kare??
@akshayjyani5362
3 жыл бұрын
same problem bro
@darshantechful
7 жыл бұрын
Plz sir i requeste you send me CLASS TO BASIC and BASIC TO CLASS TYPE CONVERSION program with exaplanation.... thank you sir
@sudheer4866
4 жыл бұрын
please make video on class to class conversion using casting operator
@vinayakgupta8286
8 жыл бұрын
Hello Sir! Sir in main function you've created object of Item type therefore making default constructor u made later to get executed but Sir then how is constructor Item(Product p) gets executed even though we haven't even pass any parameter of product type in its paranthesis or created any object like Item i2(Product p1) and in that case will writting this will be correct or not Product p1; Item(p1); ? Regards.
@abhishek_kr_8635
4 жыл бұрын
Thank you sir,good explanation 😊
@raghavjuyal1649
2 жыл бұрын
We can also inherit the product class in the item class
@anujbirani3771
7 жыл бұрын
Sir casting operators kya hote h and how they are different from type conversion please explain through videos . Thank you;
@vineet9singh
8 жыл бұрын
Sir jo product main 'p' likha h wo khi declare to kya nhi or main m p1 declare h instead of p.
@cbysaurabhshuklasir32
8 жыл бұрын
+Vineet Singh Product p1; It means p1 is an object of class Product. yeh main mein declare kiya hai. p kahin bhi nahi likha hai, sabhi jagah p1 hai. Fir bhi agar kahin meine dekh nahi pa raha hun to please batayein. Thanks for watching
@vineet9singh
8 жыл бұрын
void showData() { cout
@DeepakKumar-tr5fn
7 жыл бұрын
Vineet Singh p is argument of constructor product, it is not p1 object. so you should not confuse about this.
@memesexpert9868
5 жыл бұрын
Jb I1=P1 krenge तो dono check hoga kya sir.... ki conversion constructor ke through krna h ya casting operator ke.... kaunsa pahle check hoga
@YDbabakebolYashodipShete
8 жыл бұрын
I need ur book or DVD😊 because in my rural area there is problem in internet source😢 so plz help me😮
@utkarshgautam1940
3 жыл бұрын
god level sir
@divyasth4494
5 жыл бұрын
Class to Class type conversion through Oparator casting : #include using namespace std; class Item { private: int a,b; public: void showData() { cout
@MDARIFKHAN-bf5wn
5 жыл бұрын
Behan ji constructor use Nahi karna h.
@mohammedsuhailbasha4860
5 жыл бұрын
Sir here we passing object as argument to constructor sir, than why you do not make copy constructor sir.pls explain sir
@ajaypalsingh4259
4 жыл бұрын
Sir agar ham isme ek aur object bnae jo ek int argument le rha h aur uske liye constructor bnae to vo error de rha h sayad x=c1 us constructor ko bhi call kar rha h usi time jis time vo oprator ko call kar rha h
@ajinkyarathod5180
4 жыл бұрын
World class explanation
@tahirquraishi7031
3 жыл бұрын
Nice
@sunnyrauniyar6769
4 жыл бұрын
Ab to chhap gya hai deemag me Jab bhi hum Koi constructor bna dete hai class me to compiler default constructor nhi banata
@Anshul_pal_cz3es
3 жыл бұрын
Thanks sir i easily understand
@Lordkalki100
Жыл бұрын
We could declare item class a friend of product class so that we can access the private member of product class in item class...
@monuraaz1327
Жыл бұрын
Another approach could be we can make item constructor a friend of product class.
@mandryeye3451
4 жыл бұрын
Well explained!😃✌🏻
@shreyasingh9399
Жыл бұрын
Sir explicit constructor kya hota hai?
@anilsharma-cd2hq
6 жыл бұрын
sir please, casting operator wali video or upload kar do
@ayeshasiddiqua1037
5 жыл бұрын
Here is an example which shows the type conversion from primitive to class, class to primitive and the two cases of class to class conversion. During class to class conversion using constructor the class whose object value is being copied should be placed above (unit class in the below example) and during the operator casting the class in whose object we want to copy data should be placed above (general class in the below example). Hope it helps. #include #include using namespace std; class unit{ int k; public: unit () { } // unit (general g) // using constructor class to class conversion // { k = g.geta(); } void setdata(int a) { k=a; } void showdata() { cout
@PramodYadav-il2gk
5 жыл бұрын
#include #include using namespace std; class item { int a,b; public: void showdata() { cout
@afreedhussain1049
4 жыл бұрын
@@ayeshasiddiqua1037 Amaze......
@afreedhussain1049
4 жыл бұрын
@@PramodYadav-il2gk u r insane Super
@yashghori7872
4 жыл бұрын
@@PramodYadav-il2gk bro ye program mene compile karke dekha run nahi ho raha .... proper solution aap muje bata sakte haii?????plzz
Sir what i have to do in which task of Typeconversion of 2 classes are asked simultaneously?
@AdityaKumar-ws5pv
7 жыл бұрын
sir casting operator wala method mai kya likha jaega bata dijiye error aa raha hai.Thank you sir you r doing a gr8 job.
@akashdohare8694
5 жыл бұрын
instead of using getM() and getN() we can me class item friend class of class product
@ankitswami5407
4 жыл бұрын
this task can also be done using friend function
@maheshsirsat1811
4 жыл бұрын
exactly....
@maheshsirsat1811
4 жыл бұрын
also frnd function is easy
@ehtixhamamjad
5 жыл бұрын
thanks for help MysirG
@raghavdhawanartist2508
6 жыл бұрын
Sir u didn't posted a video on th class to class type by casting operator or type conversion operator.. plz put a video on this..req
@munish.semwal
6 жыл бұрын
so it means ke ek object ke sath dono constructor call ho rahe hai?
@anantmishra4893
4 жыл бұрын
Sir please make a video on casting operator also, its a humble request sir
@maheshsirsat1811
4 жыл бұрын
#include using namespace std; class jaa; class mayu { int a,b; public: mayu(){} void setdata(int a,int b) { this->a=a; this->b=b; } void showdata(void) { cout
@preetamprag5137
4 жыл бұрын
#include using namespace std; class item { int a,b; public: // item(){} // item(product &ob){a=ob.getm();b=ob.getn(); } void set(int x,int y) { a=x;b=y; } void show() { cout
@suryateja4776
7 жыл бұрын
sir how to compare two strings of the same class usin '=='operator overloading sir please give me reply as early as possible
@hiteshkushwaha7585
7 жыл бұрын
sir can we declare constructor of 1 class as friend function to another class.
@maheshsirsat1811
4 жыл бұрын
is bro it is possible
@meghachowdhury2088
6 жыл бұрын
Please make a video on casting operator also
@tlpunisher42
5 жыл бұрын
Here why reference of p is not used in the constructor?????
@vishnumishracoding1189
2 жыл бұрын
Sir, please make this video with Casting operator, plsssssss sir
@bijoybasumatary4651
4 жыл бұрын
U r great
@Roy-fr6yr
5 жыл бұрын
sir wo m n ko private ki jagah protected bhi toh ker skte hai na?
@prayagparikh8020
6 жыл бұрын
You are excellent sir But what about casting operator
@amriteshsingh9193
7 жыл бұрын
please upload class to class conversion using casting operator
@PAWANKUMAR-el2zk
4 жыл бұрын
And how can u do this, really wonderful
@shrishojha6490
4 жыл бұрын
sir humne item(product &p ) kyon nhi likha??
@aniketjain3101
4 жыл бұрын
kyoki humko product class ke object me kuch change nahi karna hai bas uski value leni hai
@radhatiwari2748
7 жыл бұрын
Sir please show a vedio of casting operator of example shown in the same vedio
@ujjwalbansal1070
5 жыл бұрын
This code work using the casting operator: #include using namespace std; class Item { private: int a,b; public: void showData() { cout
@forbiddenumbrella
6 жыл бұрын
sir wo parenthesis wala error code blocks me bhi aata hai.. uska reason batao sir
#include using namespace std; class Imaginary{ int b; public: Imaginary(int x=0){b=x;} void show(){cout
@poojaagarwal2000
2 жыл бұрын
Why can't we use friend keyword here?
@pkasturi4750
6 жыл бұрын
sir,please upload RTTI videos and dynamic casting videos sir,please....
@muskanmehar8043
5 жыл бұрын
Sir m or n varible or product class m public mh kr skte lya to getm or getn function bnane k bjh
@hkstar2871
3 жыл бұрын
phir koi bhi akpe data ko change ker sakta hai isliye private rakhate hai
@shrikantnavghare659
6 жыл бұрын
Sir please upload an video on operator casting please!!!
@pinkeshpatel619
5 жыл бұрын
Superb
@premrauth8416
4 жыл бұрын
Thank you sir
@pratyushtripathi1728
Жыл бұрын
#include using namespace std; class product { private: int m,n; public: void setdata(int x,int y) { m=x; n=y; } int getm() { return m; } int getn() { return n; } }; class item { private: int a,b; public: void showdata() { cout
@goodforyou7689
5 жыл бұрын
Thanks a lot
@pogoclub8495
7 жыл бұрын
conversion from one class type to another by casting function
@studywith_bunny
4 жыл бұрын
How to do that
@shyamkachhadiya4964
6 жыл бұрын
awesome sir
@devanshisoni3532
5 жыл бұрын
Sir,if I declare two constructors in item class so I declare default constructor or not??
@anujgupta3397
5 жыл бұрын
yes,u hv to declare default constructor whenever you declare custom constructor
@shivamsoni1528
7 жыл бұрын
how to solve problem if variables is not in both class ??
@anilsharma-cd2hq
6 жыл бұрын
thank u so much sir
@nikulnayi3271
7 жыл бұрын
sir i m unable to develop the program to dollar to rupee conversion
@abcdefg5698
7 жыл бұрын
casting operator se bana ne par error de raha hai
@aniketk11
6 жыл бұрын
Sir please make video for casting operator
@nargeesansari6337
5 жыл бұрын
thank u soo much sir
@harshalsali5670
4 жыл бұрын
Sir please add video of conversion using casting operator...
@mayankbharadwaj343
4 жыл бұрын
Here it is: #include using namespace std; class Product { private: int pnum1; int pnum2; public: void setnumber(int px, int py) { pnum1= px; pnum2 = py; } void display() { cout
Пікірлер: 204