Тёмный

Friend Functions in C++ Programming | Object Oriented Programming in C++ 

Simple Snippets
Подписаться 247 тыс.
Просмотров 200 тыс.
50% 1

Опубликовано:

 

16 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 174   
@SimpleSnippets
@SimpleSnippets 5 лет назад
Hey Guys, if you want more such tech educational videos on this channel then please support me by subscribing to this channel & also share it with your friends as it helps me create more content just for you ✌
@anuish04
@anuish04 4 года назад
plz make a video lecture on "COMPOSITION IN C++"
@sushamaavaghade9945
@sushamaavaghade9945 2 года назад
Okk sir
@sushamaavaghade9945
@sushamaavaghade9945 2 года назад
But sir screen is not visible clearly
@OmegaJazz
@OmegaJazz 6 лет назад
Great Lecture bro. IDK why my teachers can't teach so well. He just comes in the class with slides and just literally reads out the slides.
@SimpleSnippets
@SimpleSnippets 6 лет назад
Hehe thanks buddy. I'm glad you liked this video. Well about the other teachers, everyone's got different styles, can't really blame them anymore especially now when you have other options like this RU-vid video and many others resources online 😉 BTW I also have an article on our official website on this topic if you want to prepare answer ✌️ Link in the description 😇
@arnavsaha3631
@arnavsaha3631 2 года назад
Same
@user-rz9jh1pp8k
@user-rz9jh1pp8k 4 года назад
Well done bro. I’ve gone through friend function with my lecturer about 5 months ago and got nothing but now I’m here be able to use friend function clearly. Thanks a lot and always support you and your videos.
@SimpleSnippets
@SimpleSnippets 4 года назад
Glad I could help! Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@neerajmahapatra5239
@neerajmahapatra5239 5 лет назад
You have a great talent ...your videos will be universally viral .. Your way is simple. Your english is awesome.. You are really a good teacher.. Just keep on making video... My first earning after i will become app developer will be to you and saurabh shukla sir...(my sirg).....😍😍😍
@SimpleSnippets
@SimpleSnippets 5 лет назад
Thanks Neeraj, your comments and support means a lot to me 😇
@SimpleSnippets
@SimpleSnippets 5 лет назад
Do let me know about your app as well. Surely will be happy to know about it 😊
@neerajmahapatra5239
@neerajmahapatra5239 5 лет назад
@@SimpleSnippets ya sure sirr
@theears995
@theears995 3 года назад
Thank you! This is an amazing explanation - the friend keyword always confused me, and now I finally understand it!
@LegitSpartaN118
@LegitSpartaN118 3 года назад
Absolutely great videos that have helped me pass my C++ at university, great stuff bro
@SimpleSnippets
@SimpleSnippets 3 года назад
Oh that's amazing to know. Please do share the videos with your friends and juniors too. It might help them as well 😊
@hoorainnoor1353
@hoorainnoor1353 4 года назад
a good tutorial i build this program on codeblocks so their is no error it runs successfully and gives the out put same like your
@heartsonny
@heartsonny 2 года назад
Your explanations are so clear. Thanks !!
@swithikamutyam4976
@swithikamutyam4976 4 года назад
Superb explanation! The way you teach is so simple and much easier to understand.
@SimpleSnippets
@SimpleSnippets 4 года назад
Thank you so much buddy🙏 Please support me by sharing the videos and our channel with your friends too. Thats the biggest help and support you can provide 😇
@sunnyjain630
@sunnyjain630 4 года назад
very simple and easy way of explanations!! it all clear my doubts about friend function thank you boss!!
@SimpleSnippets
@SimpleSnippets 4 года назад
That's amazing to know Sunny 😇 thanks for this wonderful feedback. Please do share the videos with your friends too 👍
@prasannas8883
@prasannas8883 5 лет назад
Because of you I would get get good marks in cs..Thank you😊
@SimpleSnippets
@SimpleSnippets 5 лет назад
Thank you so much buddy. You really made my day by this comment 😇🙏 Means a lot to me. Do share the videos with your friends too ✌️
@siddhigolatkar8558
@siddhigolatkar8558 3 года назад
I'm currently not working so I am not in a position to donate as of now but the least I can do is to watch ads.
@SimpleSnippets
@SimpleSnippets 3 года назад
You don't have to donate ever 😊 but please keep sharing our channel & videos with your friends. That's the biggest help & support you can provide 👍✌️
@jamesnash9675
@jamesnash9675 2 года назад
you are the best..........masum
@davirafaelfranke9303
@davirafaelfranke9303 3 года назад
thank you very much for this video! i had a question on my college test asking this can you also explain what is a client class? id be pleased
@n_rounder6192
@n_rounder6192 2 года назад
Great help when exams are coming Thank you sir
@vu5700
@vu5700 4 года назад
Amazing tutorial,good job sir :)
@tanzengyang3760
@tanzengyang3760 4 года назад
Actually we declare void Distance::addValue {} if we want to access outside class ...C++ is so confusing. nice explanation..
@ajgamer3888
@ajgamer3888 2 года назад
That was great and wonderful explaination from scratch.. well done bro👍👍👍
@vedangkavathiya8426
@vedangkavathiya8426 4 года назад
Thanks brother... Nice explanation...🙂
@SimpleSnippets
@SimpleSnippets 4 года назад
Welcome 😊Please support me by sharing our videos with your friends too bro ✌
@vidhioswal9188
@vidhioswal9188 3 года назад
Explained it so well , thank you!
@SimpleSnippets
@SimpleSnippets 3 года назад
Glad it was helpful!
@308_akashsharma2
@308_akashsharma2 3 года назад
thanks you! this lecture cllears my doubt.
@SimpleSnippets
@SimpleSnippets 3 года назад
Glad to hear that!
@kunalbahirat7795
@kunalbahirat7795 2 года назад
Those who do not know about the access specifiers (public,private,protected). first watch that video and then come here. for better understanding!!
@easyconcept5677
@easyconcept5677 11 месяцев назад
craaa gl baat!👌
@swarupaswaru4361
@swarupaswaru4361 6 лет назад
Really excellent it is helpful for tomorrow's exam thank you for this
@SimpleSnippets
@SimpleSnippets 6 лет назад
Thank you so much for such a positive feedback. I'm glad this will be helpful for your exam. Please share this with your friends too as even they will get help from this 😇 Ohh and all the best 😇✌️
@swarupaswaru4361
@swarupaswaru4361 6 лет назад
Tanq
@aayushadhikari7851
@aayushadhikari7851 3 года назад
GOD level teaching
@lokanathanganesan6070
@lokanathanganesan6070 3 года назад
Thank you sir. The explanation was nice and I can understand them easily.
@harshvardhansingh780
@harshvardhansingh780 3 года назад
No words to say .... fabulous video
@laibahameed4212
@laibahameed4212 2 года назад
God bless you,so much honour and likes 🤩from Pakistan🇵🇰🇵🇰
@okprogrammer
@okprogrammer 6 лет назад
please make a video on "this" pointer in c++. And you are aswesome!!
@okprogrammer
@okprogrammer 6 лет назад
**awesome!!
@SimpleSnippets
@SimpleSnippets 6 лет назад
Okay buddy I'll make a video on this topic soon ✌️
@UsamaKhan-ct4bc
@UsamaKhan-ct4bc 2 года назад
very good teacher. really appreciate.
@pritishpattnaik4674
@pritishpattnaik4674 Год назад
crystal clear explanation bro
@adnanrasheed4366
@adnanrasheed4366 6 месяцев назад
Thank you very Much sir
@Muaz_tofik
@Muaz_tofik 4 месяца назад
Great explanation
@hihi1124
@hihi1124 6 лет назад
Will you make tutorials with data structures like stacks, binary tree and SLL or DLL?
@SimpleSnippets
@SimpleSnippets 6 лет назад
Yes definitely, infact in a recent video where I updated all channel subscribers, I said I will be covering 3 subjects on priority and asked for suggestions. The 3 subjects are Core Java, DS with C++ and C# .NET. So yes Data structures will soon be covered completely on the channel ✌😇
@oldschoolgamer6941
@oldschoolgamer6941 3 года назад
thanks
@SimpleSnippets
@SimpleSnippets 3 года назад
Welcome
@nirajjain04
@nirajjain04 5 лет назад
Explanation level 999!💥😅
@SimpleSnippets
@SimpleSnippets 5 лет назад
Thanks bro ♥️
@viwotosheqi
@viwotosheqi 4 года назад
Tomorrow I have practical exam helped me understand
@SimpleSnippets
@SimpleSnippets 4 года назад
Thats great to know buddy, please do subscribe& share the video with your other friends too :-) 😇
@kanhiyamittallyrical
@kanhiyamittallyrical 3 года назад
Thanku sir, great explanation 👌
@akshatvyas2594
@akshatvyas2594 4 года назад
Why passing d1 argument in addValue function.
@aarjavbaxi2299
@aarjavbaxi2299 3 года назад
i didnt understand what does that (distance &d); mean..can someone explain??
@ameelaaslam7328
@ameelaaslam7328 4 года назад
Guys Mara final paper ha oop ka or kuch ata e ni abi tk , ab ma try kr ry hyn k prepare ho jy please dua kryn Mary liy
@kunalsakhare7538
@kunalsakhare7538 5 лет назад
In program I got a error - Void addValue function is showing error saying - reference to Distance is ambitious.
@SumantKumar-jn9fm
@SumantKumar-jn9fm 4 года назад
Ambiguous*
@harshjoshi4539
@harshjoshi4539 4 года назад
same here did you get solution
@thephysicist989
@thephysicist989 3 года назад
Out of curiosity, how does your visual studio look so old? I actually like that classic look
@timewrath7723
@timewrath7723 3 года назад
So, what else does a friend function do, aside from being able to access private elements? I'm not sure what else the friend function did in the main() function.
@funnkidunyan1940
@funnkidunyan1940 3 года назад
How you speak flowly👌🏻
@BushraFatima-w3e
@BushraFatima-w3e Месяц назад
I am facing an error when i compile and run the code i.e reference to 'distance' is ambiguous
@vedantghate92
@vedantghate92 3 года назад
you are superb bro.......
@saugatthapa6295
@saugatthapa6295 5 лет назад
#include using namespace std; class distance{ private: int meter; public: distance(){ meter = 0; } void disp(){ cout
@adarshtodi1158
@adarshtodi1158 5 лет назад
@muhammed sahad ibn abdul samad same problem.. found any solution?
@akashshaw1594
@akashshaw1594 5 лет назад
Change your class name to Distance or something else bcoz your current class name 'distance' is clashing with another symbol from namespace
@G__BagulSamruddhi
@G__BagulSamruddhi 3 года назад
@@akashshaw1594 thank you sm! this helped!!:)
@_ARITRIKABISWAS
@_ARITRIKABISWAS 3 года назад
Thank you
@farahhamid360
@farahhamid360 4 года назад
Plz upload a video about dynamic variables (pointers) 🥺🥺🥺
@SimpleSnippets
@SimpleSnippets 4 года назад
I already have that in this C++ programming playlist. Do check it out :-)
@kannadasanr9849
@kannadasanr9849 3 года назад
Hai bro , I want to learn component object modeling in C++ . Do you have any video tutorials for that. Or just give me suggestions for how to begin.
@mohammedzayedkhan9685
@mohammedzayedkhan9685 2 года назад
Friend is declared inside the class
@himanshubhatt6240
@himanshubhatt6240 3 года назад
Loved this🧡♥️
@sandrokan89
@sandrokan89 6 лет назад
One thing does not make sense to me, and that's something I've seen being done in every "friend function tutorial"... WHY do you put the friend function in the public section of the class? Isn't that redundant, as a public function can be accessed "publicly" (just like the 'get' and 'set' methods)?? Would the code still work if you were to put the public function in the private section?
@cosmicgyan6732
@cosmicgyan6732 3 года назад
We need to access private data of a class that's why
@abdulqadoos80
@abdulqadoos80 3 года назад
Outstanding bro
@sreehari4485
@sreehari4485 3 года назад
Pever💥
@patjiyane6906
@patjiyane6906 6 лет назад
Can a friend function declaration prototype be declared with no return type? friend Rectangle duplicate (Rectangle & rect1, Rectangle & rect2); duplicate (foo, bar);
@Durgasivakumaran
@Durgasivakumaran 3 года назад
😍all videos👌
@RahulCarpenter
@RahulCarpenter 5 лет назад
great bro!! Keep Uploading🙌🙌
@SimpleSnippets
@SimpleSnippets 5 лет назад
Thank you so much brother 😇 I would request you to please share the video with your friends and contacts 😇
@RahulCarpenter
@RahulCarpenter 5 лет назад
​@@SimpleSnippets definitely bro!!
@SimpleSnippets
@SimpleSnippets 5 лет назад
Thank you so much bro 👍
@oscarwang7920
@oscarwang7920 5 лет назад
Nice work bro !
@SimpleSnippets
@SimpleSnippets 5 лет назад
Thanks bro ✌️
@GameingYKSipa
@GameingYKSipa 4 года назад
I loved ur explanation ❣️
@SimpleSnippets
@SimpleSnippets 4 года назад
Thank you so much bro, Please do share the videos with your friends too bro. That will be the biggest help & support 😇
@anushkaaggarwal2972
@anushkaaggarwal2972 4 года назад
i am having an error. when i defined the addvalue function, it showed that reference to distance is ambiguous. please help
@hypermeero4782
@hypermeero4782 4 года назад
me too try this out , it will work tho.. #include using namespace std; class test{ private: int data1,data2; public: test(); //Default Constructor test(int a , int b){ //Parameterised Constructor which is Constructor with arguements data1 = a; data2 = b; } void display(); friend void multiply(test); //Friend Function (doesnt matter where you initialize it) }; //End of class void test::display(){ cout
@ashishkatyal
@ashishkatyal 4 года назад
Make the first letter of the class name capital
@paramgill2712
@paramgill2712 4 года назад
@@ashishkatyal it worked thankks, but can u explain why so?
@ashishkatyal
@ashishkatyal 4 года назад
@@paramgill2712 I'm glad it helped. You can declare it with lower case, but it may not work in some compilers as the convention is to start with a capital letter. The conventions were created to make it easier on others to read and understand your code.
@kunalagarwal4473
@kunalagarwal4473 3 года назад
@@ashishkatyal thanks buddy it worked :-)
@Selva-bx9iy
@Selva-bx9iy 4 года назад
Ur amazing bro❤
@SimpleSnippets
@SimpleSnippets 4 года назад
Thank you so much Selva. Glad to hear this from you. :-) Please do share the videos with your friends too & hope you have subscribed. Thats the biggest help and support you can provide :-)
@sabahatfaria168
@sabahatfaria168 6 лет назад
Plz explain a bit about friend classes as well i hope i can make a request after all there is a specific quota for "ON DEMAND VIDEOS"😊🤗
@SimpleSnippets
@SimpleSnippets 6 лет назад
Definitely, I'll create one video on this topic for sure 😇 And yes there is always an on demand option for all of viewers and subscribers 😇✌️
@sabahatfaria168
@sabahatfaria168 6 лет назад
Thnx for ur attention on my small request🤗🤗
@sabahatfaria168
@sabahatfaria168 6 лет назад
Kindly try to make my requested video before 16 may after all i need your help for my exam🙂🙂
@SimpleSnippets
@SimpleSnippets 6 лет назад
I will try to post this video by day after tomorrow 😇✌️
@sabahatfaria168
@sabahatfaria168 6 лет назад
Thnx alot once again working like that will definitely make one to pray for u😊😊
@Mahesh-wr6uc
@Mahesh-wr6uc 4 года назад
Sir can you kindly provide vedios on dynamic data structures in c++
@thefive.am.c
@thefive.am.c 2 года назад
isn't the friend function declared inside the class , sir ??
@nashhash4625
@nashhash4625 6 лет назад
cout
@sudharsanbalasubramaniyan3761
@sudharsanbalasubramaniyan3761 4 года назад
Super bro
@Blooderstokizz
@Blooderstokizz 4 года назад
Best indian guy ever
@SimpleSnippets
@SimpleSnippets 4 года назад
Haha thanks buddy, highly obliged to have such a title ❤😇
@bestsaurabh
@bestsaurabh 3 года назад
Can we have a friend class as well to access private members just like the friend functions?
@syedimadhaqqi4340
@syedimadhaqqi4340 5 лет назад
Good lecture. I am getting an error when I implement your program. It is: error: 'int Distance::meters' is private. What does this mean. I cannot run the program. Also, I have to use #include and getch() to see a result, otherwise the output screen pop up and vanishes. Does not stay like your output screen. Do you know how I can get a output without this. My program is written below: Thanks #include #include using namespace std; class Distance { private: int meters; public: Distance() { meters=0; } void displayData() { cout
@internetzz2322
@internetzz2322 4 года назад
Change the return type from void to int , for the friend function it should work
@syedimadhaqqi4340
@syedimadhaqqi4340 4 года назад
@@internetzz2322 Still same problem
@hamzajlassi2845
@hamzajlassi2845 4 года назад
like the intro bro
@SimpleSnippets
@SimpleSnippets 4 года назад
Thats great to hear buddy, Please do subscribe and share our channel with your friends too! Thats the biggest help and support 😇
@mahesh-jg3zx
@mahesh-jg3zx 5 лет назад
Sir what is the use of & symbol why we are using it
@viwotosheqi
@viwotosheqi 4 года назад
Good video
@SimpleSnippets
@SimpleSnippets 4 года назад
Thank you :-)
@lotsoflols6822
@lotsoflols6822 4 года назад
Keep it up👍
@SimpleSnippets
@SimpleSnippets 4 года назад
Thank you so much, please do subscribe and share the video with your friends too. Thats the biggest help and suport you can provide in return😇
@sponge8697
@sponge8697 4 года назад
Hi. Do u need to pass the ostream “cout ” to displayData function in your class?
@divijsamuel7229
@divijsamuel7229 4 года назад
cant we name the constructors with a name different than the class??
@SimpleSnippets
@SimpleSnippets 4 года назад
Nope✌
@ismailbajrami7478
@ismailbajrami7478 4 года назад
how this program runs in the line 12 the variable name is meter but in the privat its meters ? i expected and error but ok
@Omarismail-vs4jl
@Omarismail-vs4jl 4 года назад
I guess you werent watching the video
@sirisagar3606
@sirisagar3606 3 года назад
bro can you clear my doubt- what is function of cpp
@SimpleSnippets
@SimpleSnippets 3 года назад
I have a video on this topic too!
@sirisagar3606
@sirisagar3606 3 года назад
@@SimpleSnippets ok😊
@okkhot479
@okkhot479 4 года назад
Which software u have used for code
@SimpleSnippets
@SimpleSnippets 4 года назад
Dev C++
@BringMe_Back
@BringMe_Back 3 года назад
Nice 🤤, thanks
@amannagar1108
@amannagar1108 5 лет назад
U r top good
@SimpleSnippets
@SimpleSnippets 5 лет назад
Thanks Aman😊 glad to hear this feedback bro ✌️
@allareintomyworldofinventi3117
@allareintomyworldofinventi3117 3 года назад
what are you studying now bro
@SimpleSnippets
@SimpleSnippets 3 года назад
The next topic that I have to make video on 😜 (Data structures and algos basically)
@abdullahawanz_278
@abdullahawanz_278 3 года назад
Love from pakistan🖤
@SimpleSnippets
@SimpleSnippets 3 года назад
Thanks buddy, I'm glad to hear this. Please do share the videos with your friends too. That's the biggest help and support you can give back to me 🙏😊
@himanigulati6922
@himanigulati6922 4 года назад
i am gettin so many errors. although i have written the exact same code!
@SimpleSnippets
@SimpleSnippets 4 года назад
Well in the video things worked out without errors isnt it ? So IDK how come you are getting so many errors 😅 Check the video description for the full code and cross check it again maybe ✌
@himanigulati6922
@himanigulati6922 4 года назад
@@SimpleSnippets can i send you the error its showing somewhere else?
@SimpleSnippets
@SimpleSnippets 4 года назад
@@himanigulati6922 I don't debug others code so don't expect me to solve your queries and errors, but still you can DM me via our Instagram page - instagram.com/simplesnippets Or mail me at - simplesnippetsinfo@gmail.com
@onezaalvi9866
@onezaalvi9866 4 года назад
levellllllllllllllllllll
@bhairavaswami7897
@bhairavaswami7897 4 года назад
Sir please explain slowly,we canot move with your speed
@SimpleSnippets
@SimpleSnippets 4 года назад
Agreed, I will make sure to go slow in future. Sorry for the inconvenience
@Goat-gamerzz
@Goat-gamerzz 4 года назад
i think your speed is pretty good , i watch your vids at 1.8 speed
@Nikhil-yi3qc
@Nikhil-yi3qc 4 года назад
Which IDE are you using?
@SimpleSnippets
@SimpleSnippets 4 года назад
Dev C++ IDE
@turdle69420
@turdle69420 4 года назад
"nice intro" - no one
@ashwiniuppin5007
@ashwiniuppin5007 6 лет назад
Sir what is your qualification ????☺
@SimpleSnippets
@SimpleSnippets 6 лет назад
I completed my post grad - masters in computer applications a year back! MCA ✌️ Although I don't think qualifications matter 😛
@vineetjindal6582
@vineetjindal6582 2 года назад
explain in Hindi also
@Kennerdoll
@Kennerdoll 3 года назад
bro take it easy data you have but you are too fast
@venkateshojha5520
@venkateshojha5520 4 года назад
It will be greatful if u a create watsapp grp
@ArvindLohar-h2k
@ArvindLohar-h2k Год назад
very poor explanation first get advanced and learn how to use vs code.
@armv7-m603
@armv7-m603 6 лет назад
Thanks
@SimpleSnippets
@SimpleSnippets 6 лет назад
You're always welcome. Do share the videos with your friends and contacts :-)
@gouravmajee9913
@gouravmajee9913 3 года назад
thank you
Далее
Exception Handling in C++ Programming
10:12
Просмотров 212 тыс.
Friend Functions | C++ Tutorial
13:05
Просмотров 9 тыс.
Friend Function in C++(Urdu/Hindi)
9:57
Просмотров 15 тыс.
Master Pointers in C:  10X Your C Coding!
14:12
Просмотров 306 тыс.
What are C++ namespaces? 📛
4:37
Просмотров 33 тыс.
Object Oriented Programming (OOP) in C++ Course
1:30:26