📚 Learn how to solve problems and build projects with these Free E-Books ⬇️ C++ Lambdas e-book - free download here: bit.ly/freeCppE-Book Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObjectPascalEbook 🚀📈💻🔥 My Practical Programming Course: www.codebeautyacademy.com/ Experience the power of practical learning, gain career-ready skills, and start building real applications! This is a step-by-step course designed to take you from beginner to expert in no time! 💰 Here is a coupon to save 10% on your first payment (CODEBEAUTY_YT10). Use it quickly, because it will be available for a limited time. Homework solution: #include #include #include using namespace std; class KZbinChannel { string Name; int SubscribersCount; public: KZbinChannel(string name, int subscribersCount) { Name = name; SubscribersCount = subscribersCount; } bool operator==(const KZbinChannel& channel) const { return this->Name == channel.Name; } friend ostream& operator
@Usammityduzntafraidofanythin2 жыл бұрын
I figured you'd have to use public access for much of the classes - otherwise I'd be making int main() a friend along with making the classes friends of each other, and even then I'd get an error with == operator being private due to a context of some sort of access inability in a template in a file called 'list.tcc'. I'm guessing my approach of not using public access at all would have been impossible?
@StreuB13 жыл бұрын
You are so amazing with this stuff, Saldina. I just completed my C++ for Engineers and Scientists class and nailed a 95.6% for the class. I owe at least part of that to your great videos. And now that I know classes, I can understand this topic which he never did in my class. Thank you!!!! 😀
@pavankumarnitta03293 жыл бұрын
Can you please post a full detailed long video on below two topics: Data structures using C++ STL using C++
@joonbeomkim989811 ай бұрын
I have watched three different videos of friend functions on KZbin and you are absolutely the best. You explains in details why we need to use friend functions and when to use them. I subscribed you and will keep watch your videos! You're very talented teaching c++.
@talm55682 жыл бұрын
Finally found the ultimate teacher... So concrete and so useful. You're the best...
@quasirdp3 жыл бұрын
Another way, to have firend function, #include using namespace std; class Base; class BaseFriend { public: void printResult(Base& b); }; class Base { private: float a; float power = 0; public: void setA(float l) { a = l; power = a * a; } friend void BaseFriend::printResult(Base&); }; void BaseFriend::printResult(Base& b) { cout
@codeforlifehere Жыл бұрын
One of the most clear explaination of Friend function on the internet.
@kristinarakic7054 ай бұрын
You made my preparation for the exam easier and less stressful. Thank you for the good work!
@Ninvus217 күн бұрын
I've never seen circumference used to refer to the combined edge kength if a polygon. Usually the word used for that attribute is perimeter. Circumference is for circles and ovals.
@eric-jt2 жыл бұрын
I come to your channel everyday to learn something new. Thanks!
@CodeBeauty2 жыл бұрын
I'm happy to hear that, cheers 🥰🥰
@sravankumpati6564 Жыл бұрын
Hi, thank you for your outstanding videos. Very helpful and refreshing. In C++, a function can be designated as a friend of a class, allowing it to access the private and protected members of that class. This friendship can be established in three ways: a stand-alone function, a member function of another class, and a separate class. In your last example, you mentioned that a member function of another class cannot be declared as a friend. To clarify, it is indeed possible to declare a member function of another class as a friend. What was likely meant is that a member function of a class cannot be declared as a friend of the same class it belongs to. In the context of friend functions, the typical scenario is to declare a stand-alone function or a member function of another class as a friend of a class, enabling it to access the private and protected members of that class. If you need to provide friend access specifically for a member function of another class, you can achieve this by declaring the entire class as a friend, not just the individual member function. Would you please clarify?, thank you.
@retr09182 жыл бұрын
Thanks a lot for those awesome videos!! I used to learn C++ and it was too hard for me so I gave up. After watching your tutorials, your excellent and outstanding work has given me confidence in learning C++ and interest in programming again. You are an excellent teacher and a role model for me on the way to learning code. Now I think the code is really cool, I also hope to become a programmer one day. Thank you again for everything.
@tentandoumcover2 жыл бұрын
I'm in love with this channel, and even if I'm not fluent in english I can understand you pretty clearly.
@sourabhsingh19210 ай бұрын
she cleared the concept very clearly, good work
@muha06443 жыл бұрын
When you finish making all the beginner videos, you should make some videos about Qt 6. It's more advanced and _way_ more capable, and it's relatively easy to use. Personally I love programming with Qt, since it just lets you do everything your way and it has a very deep connection with C++ (they "invented" a lot of the things in stdlib today like smart pointers etc...). I particularly find the concept of signals and slots amazing for multi-threaded programs. While it is mostly used to make GUI apps, you can also just make CLI programs that work really well. If you don't know anything about qt, then make it your new years resolution to learn it. I guarantee you won't regret it. Sretna nova godina!
@yoselinnicole34225 ай бұрын
thank you so much, I watched 1000+ videos and they never explain everything in so much detail!!!
@Loki-vy5vg Жыл бұрын
you said creating getters is not a good solution because, everyone would be able to excess the class variables using getters, but the same thing is true for a friend function also, everyone can still access them now using friend function.
@rajnishsingh13482 жыл бұрын
mam its my first time to watch your video . your explanation is great, thank you for this type of useful videos love from INDIA
@aritramajumder49822 жыл бұрын
Hey Saldina, your lessons are greatt 😁. And one thing, I guess it's called perimeter, circumference is perimeter of circle...
@houssemeddine56852 жыл бұрын
You are the best teacher ever. Thanks for reminding me how beautiful programming is. *_*
@SergiuMuntean-q5n2 ай бұрын
God bless you, Saldina! You are so good at explaining these concepts.
@CodeBeauty2 ай бұрын
currently I'm focused more on teaching C# because there is higher demand for C# developers, so you might wanna check my Practical Programming Course at www.codebeautyacademy.com We are building real C# application and you will be learning alongside other students, with me as your personal tutor. With this you will also gain access to exclusive Discord community. I'll be happy to have you there. :)
@mariacunha85088 ай бұрын
Wow, I love how you can make a topic seem so simple and easy to understand!!! Love it!
@CodeBeauty8 ай бұрын
🥰🥰
@sangeeth.4711 ай бұрын
❤ Really Appreciate the efforts... Explained a lot of better than teaching in my university.
@altoclef49892 жыл бұрын
Awesome stuff, thank you for helping me brush up on my OOP skills.
@lipegranadoАй бұрын
4:16 Nazareth Tedesco was a character in Brazilian novel Senhora do Destino and interpeted by Renata Sorrah.. One of most brilliant actresses in Brazil! ( And is a meme some years ago 😂) Thanks from BR for the nice teaching skills!
@edclam Жыл бұрын
I choose to stay not only because you're amusing (haha) also because you explain the concepts very well, step by step and logically.
@Sooshee_J2 жыл бұрын
I finally understand them...thanks!
@kolbe64363 жыл бұрын
Great Job! I learnt alot today, and I am grateful.🙂
@yusraazrademirel2195 Жыл бұрын
I am studying c++ for months and i couldnt understand anything and i was afraid of my midterm exam but i feel like i am starting to understand so thank you so much (ps: your diction is very good so i can understand easily even though i am not native in English and also you speak sincerely so I don't start daydreaming in class and I listen carefully :) . Thanks again)
@prabasangaralingam4428 Жыл бұрын
Please view Bro Code videos too. It's very detail course with real examples.
@roshanpoudel51403 жыл бұрын
Hey, waiting for the premiere ,lots of appreciation and thanks for teaching us.
@nikhielsingh7482 жыл бұрын
great video , love from South Africa
@danielkolev74582 жыл бұрын
You need to use this pointer when setting the length in setA function . It is a good practice!
@kavyag6326 Жыл бұрын
Hi Saldina, Can you please make a video on using friend classes with a forward declaration for the Google test without altering the source code?
@isaacl.quelemine87753 жыл бұрын
I ready do admire your teaching always You’re quite amazing 😻 .
@ferfykins11 ай бұрын
Excellent explanation, ty so much!
@sambi8074 Жыл бұрын
The reason the PrintResults function won't work is because you made it a member of the Homework class. So to access it you would have to use to dot operator after making an object of the homework class.
@neepunpatil52013 жыл бұрын
Wow so nice I completed Your OOP C++ video and I was about to learn friend function and your uploading a video so nice thank you Ma'am
@brandonpanuco85462 жыл бұрын
Thank You! You explained it way better than how my book tried to! 👍👍👍
@Ayush-qn7hy3 жыл бұрын
Saldina how about a code review series? We would love to send you our C++ projects 🙂 and would love your reaction on it.
@akanguven114 Жыл бұрын
we have not called PrintResults function yet, and walso we have to pass the et object as the parameter... God bless you!
@a.yildiz6866 Жыл бұрын
Could you please make a video about when we should use "const", and when should we pass by const reference or by value.. Thank you!
@bestpractices24123 жыл бұрын
Thank you so much for the videos. They are very helpful. The way you are explaining from basic level followed by intermediate level is very helpful. Also, please make the videos on advanced concepts and incorporating security measures (like buffer overflow) in C++ code. Also, kindly post videos very frequently.
@abubakarusman5298 Жыл бұрын
Thanks alot for these kinda outstanding videos, it means alot to me (student)
@jaja7830 Жыл бұрын
Imas svoj stil, objasnjavas jasno i detaljno. Puno truda ulazes u svaki video i to se vidi. Hvala jos jednom. :)
@jasnarmstrng Жыл бұрын
Wholesome programming content indeed 😊
@Anclavijo857 ай бұрын
Hi Saldina first of all, your videos are great and well explained, question, what is the differences between friends class and Inheritance what are the benefits of using friends over Inheritance?
@pedrovinicius5128 Жыл бұрын
You used a Brazilian meme hahaha. I'm from Brazil. Excellent content, thank you.
@кяѕниѕняи3 ай бұрын
I am happy to see that i am not the only one who forget basic mathametics while i am wriing some code. 😁😁
@CodeBeauty3 ай бұрын
oh it happens to me on daily basis :)
@nastaranhendijani6819 ай бұрын
thank you, very helpful!
@jakubsz46022 жыл бұрын
incredible work!
@franktan99379 ай бұрын
your lessons are great
@Morderkainer3 жыл бұрын
Share it with your friends, but she told us to be careful to choose friends and friends don't inherit and friendship isn't mutual, so basically now I haven't friends to share it. 😔
@eugenechauke3849Ай бұрын
What compiler do you use and can it work on Mac?
@montyGator Жыл бұрын
9:40 - You forgot to call the function :D
@taetaebahohiningamo3 жыл бұрын
Hello from Philippines!
@Timekepper2 жыл бұрын
What is the advantage of friend function over friend classes ???
@robertingersoll30392 жыл бұрын
excellent video, the humour was also good.
@speedbird7587 Жыл бұрын
Really very instructive lecture ! Thank you
@victordedon39173 жыл бұрын
Thou shall not fall in love with your teacher 😭😭😭😭
@The_double_side2 жыл бұрын
something similar ....... coincidence do happen wow.......
@RejhanTrubljanin2 жыл бұрын
disgusting
@dxshawn532 Жыл бұрын
Victor are you saying you're gay?
@Якороче-ц1н Жыл бұрын
Simp init
@zero-ui1ew7 ай бұрын
Nah u down bad
@diegocamposjimenez666 Жыл бұрын
The results from a calculator and this program for the area is different. Quite similar, yet big gap. Why is that? How is float rounding?
@vihangajuly63163 жыл бұрын
best teacher😻🙂
@lilgohan Жыл бұрын
thank you for updating to dark mode
@TrailVapor6 ай бұрын
a problem with using friend functions is that they are not as optimizable or as self documenting as comprehensive getters & setters.
@salmonsushi477 ай бұрын
3:00 perimeter not circumference
@Mint-t4d10 күн бұрын
also area is half*width*height
@ashutoshsharma19942 жыл бұрын
what keyboard you are using, sounds fantastic
@chrisv1459 Жыл бұрын
Instead of circumference it's called perimeter! Great videos thanks 👍
@محمدسيدالكوميالكومي3 жыл бұрын
Please, could you explain a data structure type that is called a graph or tree Thank you very much
@altoclef49892 жыл бұрын
Would you like me to link you some resources I've found helpful?
@bubble_gum_witch7 ай бұрын
thanks so much❤
@kubolor12346 ай бұрын
Suspenseful stuff...absolutely blindsided by the area of triangle formula 🤣
@krishsharma62762 жыл бұрын
you are just awesome😇 I love the way you teach😄👌
@carloslugo46003 жыл бұрын
Merry chrismas and happy new year.
@che5738 Жыл бұрын
// friend functions // #include // using namespace std; // class Triangle{ // private: // int side_length, circum; // public: // void set_side(int a){ // side_length=a; // circum=side_length*3; // } // friend void PrintResults(Triangle); //no need to specify parameter name....parameter type is enough // }; // void PrintResults(Triangle obj){ // cout
@claudianohra30452 ай бұрын
Dear Saldina, i am trying to find in your channel a video of getter and setter but i can't find it anywhere.If you made a video explaining them can you please send me the link ? Have a nice day ! And thank you for your videos i understand everything you say and it's very helpful :)
@CodeBeauty2 ай бұрын
those are parts of Encapsulation, here are videos for both C++ and C# kzbin.info/www/bejne/rIKZnGSLa9N0ers kzbin.info/www/bejne/l2m9c2CKhadpe7c
@claudianohra30452 ай бұрын
@@CodeBeauty thank you !!!! Have a nice day :)
@jamesmoran817 Жыл бұрын
Would it be possible to post .txt with your KZbin videos, it would be easier to follow along?
@samanehimani79082 жыл бұрын
excelent . thanks . i download all your videos. thanks
@chhamza4566 Жыл бұрын
Can we access a friend function, friend member function and friend class in a same program?
@harishraam6674 Жыл бұрын
Thankyou saldina.
@ukaszpaka14792 жыл бұрын
Hey! Is it a good idea to pass a parameter to the friend function by the constant reference?
@mohamedchraga55123 жыл бұрын
Hello, thank you for this great job. Could you please do a tutorial about modern C++ (like C++11 and more). Thank you in advance ☺️
@glitchmaster88902 ай бұрын
ngl i never comment but your actually really good at explaining
@cybafour91242 жыл бұрын
What's theme you use
@xinking26442 жыл бұрын
awesome! thanks for share!
@truecodeface3 жыл бұрын
Hi, Saldina! good morning according to Afghanistan Time Zone. thanks a lot from this lecture also i was a little bit worry about you because you wasn't present on your social media.so I wish from GOD to help you what something wrong happened with you to solve As soon As possible.
@ahmadahmad-ug8ls8 ай бұрын
u are a legend istg
@theflamingstar51403 жыл бұрын
I love your contant and your stille in explain
@ashishjangra71673 жыл бұрын
Great mam. Where are you from
@mustafaaltay49202 жыл бұрын
Amazing ve beneficial videos, thanks ...
@Kraboobee Жыл бұрын
I actually did stay because you are extremely amusing 😂
@sulfur320663 жыл бұрын
Good job, thanks 👍
@reginaphalange1361 Жыл бұрын
Thank you
@anupnadagouda82403 жыл бұрын
Mam, I want to develop an application for laptop functionality testing. I am new to c++, which tool I can use
@iamasra41222 жыл бұрын
You’re amazing 🤩🤩🤩🤩🤩
@arazmuhammetatayev74202 жыл бұрын
4:10 I watched that part like 5 times... so cute haha
@ZiaurRehman-ex3of8 ай бұрын
now printresult is not a global function that's why it give error
@mazenas34432 жыл бұрын
thank u very much princess
@shritishaw75103 жыл бұрын
At 1:34, I saw public class MyBaseClass, how did you do that, I am also trying the same in my C++ 14 visual studio, it's not working, hoping to get your reply back.
@aliali-xx8ur8 ай бұрын
THANKS
@CodeBeauty8 ай бұрын
You're welcome 🥰
@Kometha2 жыл бұрын
THANKS!!!
@arshmaanali7143 жыл бұрын
mam plzzzzzzzzzzzz 🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽🙏🏽 make video on aggregation and composition in C++