C++ FUNCTIONS (2020) - What is function overloading? PROGRAMMING TUTORIAL
Vložit
- čas přidán 29. 08. 2024
- Function overloading is the ability to create multiple functions that have the same name but different implementations. In this video of the C++ programming course, I'm explaining how to do function overloading.
📚 Learn how to solve problems and build projects with these Free E-Books ⬇️
C++ Lambdas e-book - free download here: bit.ly/freeCpp...
Entire Object-Pascal step-by-step guide - free download here: bit.ly/FreeObj...
🚀📈💻🔥 My Practical Programming Course: www.codebeauty...
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.
Download Visual Assist here: bit.ly/WT-CB
I use it to enhance the performance, features, and support for C, C#, and C++ development in Visual Studio.
Download Ultra Edit here: bit.ly/UE_CB
It is a powerful, secure text editor designed specifically for programmers.
☕ If you've found my content helpful and would like to support me, you now have the option to buy me a coffee or a cookie! It's a small gesture of gratitude that means a lot to me and helps me keep creating free educational videos for you. You can use the link below to make a contribution: bit.ly/CodeBea...
However, please don't feel obligated to do so. I appreciate every one of you, and I will continue to share valuable content with you regardless of whether you choose to support me in this way. Thank you for being part of the Code Beauty community! ❤️😇
If you are a beginner in C++, check out my "C++ for beginners" course: • C++ FOR BEGINNERS (202...
Follow me on other platforms:
Instagram 📸 - / truecodebeauty
Twitter 🐦- / truecodebeauty
📚 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.
Wow, I found your channel by accident. Let me tell you, it is amazing!
Currently I'm pursuing a CS Degree and your channel has become my best friend. Thank you so much! :D
Thank you Diana and good luck! 🤞🥰
The only CZcamsr that made me understand coding ! Kudos to you ❤️
C++ is my first language, and im trying to get into junior developer role without degree wish me luck :P maybe more interview videos, do u remember what they expect from you when u get your first job? Greetings from Poland
Best regards to Poland! 🤗
Besides things that I covered in my tutorials, you should know about data structures and algorithms. You should also be familiar with pointers, and definitely must have knowledge about OOP.
I'm preparing a C++ crash course that covers a lot of these, so when the video is published, I can let you know if you want 🤓
So, did you get a job?
Hmmm, can you actually find a job knowing just C++ along with algorithms and data structures? I feel like this set of skills is only ever needed if you're pursuing embedded systems (Which don't have high demand and require a lot of deep hardware knowledge), or if you're just trying to understand the fundamentals of CS and get high scores in exams. Otherwise, you'd mostly need to target stuff like Mobile, Front or Back - end, DebOps. Which all require a heavy set of tools and technologies. C++ is a great way to get to know how code interacts with the computer though. I just want to make it clear that just knowing it won't be enough to find a real software development job.
Heeeloo!? Did you get a job or not?
We need an update dood. You get a programming gig yet?
*Although it can also be done with generics, function overloading is when you have functions with the same name that use different variables, and potentially have different algorithms.
ex:
int sum(int a, int b);
float sum(float a, float b);
Thank you for the explanation, Saldina!
you should make a full course for udemy. i would pay for it. you make things simple and understandable. (i am not native English speaker, but you are really clear in the explanations
You've really help me on your channel. I didn't understand it in class. Good teacher.
🤓
Thanks dear
I have just discovered your tutorial. A very good for begeinners. Regards from Poland.
I'm learning C++ at the moment and I was curious if you can make a video about "is" functions like: isalnum, isalpha, isntrl, isdigit, isspunct, and isspace.
totally different look awasome!!!
Thank you ma'am.
Love You Teacher 💖💖💖
Love your tutorials . They are very informative and easy to understand🥰
Thanks
Thanks from Pakistan!
You're welcome 🇵🇰 ❤️
Love from india❤️❤️🔥🔥
Your teaching method is osm mam 👌👌keep it up this nyc work
Btw thanku very much🙏🙏
u r looking amazing in this video.
Una clase muy didáctica !!! Gracias.
It's really amazing what you are doing. When will you present about Arrays.
I already did. Please take a look at my "Data structures" playlist 🤗🤗
It was fantastic. Thank you
Hello, do you know how bitwise can display floating point? If you could make a video of bitwise multiplying subtracting adding and exponential without using mathematical operation
I understand this, but wouldn't it make for more readable code just to say call the last function fSum, or something like that, so each function is uniquely named.
thank you soooo much miss
Thanks for the video! For me this is like: i have 3 children and all of their name is John. I dont see the point. Why confusing are self is good to as? If someone have usefull practice ideas it will be appreciated.
is it possible to define a type which involves several types?
for example, something like this
myType sum(myType a, myType b){
return a+b;
}
And in this case myType can mean int, float or double depending on the inputs.
Thanks Saldina
Maybe this video can help you 😃😃
czcams.com/video/qrJjFN4Igfw/video.html
@@CodeBeauty thank you so much Saldina, I came back to post this same video to answer my own question, thank you again =)
for any viewer, the answer can be templates, you can define your own types as -- template -- I am using the vatiable T instead the variable myType that I used in the question
so my question would be: T sum (T a, T b) {return a+b}
you ate fren!!!!!!!!!!!!
Hi, thank you for the uploads, I am a new subscriber. would you consider doing something with JavaScript in the future and maybe throw a framework there or something? Regardless, thank you for the content and looking forward to this secret. Keep it up.
Hi Oz 🤗
Yes, I would definitely. I'll make JS courses when I catch the time from the ones that I already started. 😊
And when it comes to frameworks, I'm interested if you would like to see Angular or Vue.js 🤔
@@CodeBeauty Hi, thank you for replying. Vue.js would be the one, if you ask me, but nevertheless, my opinion alone won't help. Maybe post a poll for people to vote. I will be waiting for your course. Thank you again.
Very helpful, but if the called functions each were doing different math operations, not only the sums, that would be more clarifying.
When you wrote the ur code in line, what do you do to make better readable? (i.e what is shortcut?) :)
Mam Why you use system("pause>0"); ?
can you make a vid explaining assignment operator overloading / copy constructors?
Please do a video about scope resolution operator.
why you used function first by prototype and then defining them below main funct is it just like personal choice or does is make any difference if we define functions before main and not use function prototype that way.
Have you uploaded videos on operator overloading?
Yes :D czcams.com/video/BnMnozsSPmw/video.html
I do not have the pop-up providing the option to choose the functions of either, int, float or double? Could this be a UI setup issue?
The compiler chooses the appropriate function itself based on your input (e.g. if you choose two numbers 2.5 and 3.1 the compiler automatically selects the double sum function).
Curious...If I overload sum with the same amount of parameters for float sum(...) and double sum(...), which one will be chosen?
ex:
float sum(float a, float b) { return a+b;}
double sum(double a, double b) {return a-b};
int main() {cout
Because it is higher precision 😊
@@CodeBeauty Thank you. :)
Overloaded functions are not differentiated based on the return type.
Seems to be overloading it is the type for all occasions?
What if you want to get the values from the keyboard9
Pass by reference or you shoud esseniatlly place the variables in memory and use a pointer to pull the data back where necessary.
Hi function is what l need to code for my EA need to code (Name BarCount) [51] bars + [51] bars + [51] bars = [153] bars and return function to my EA
Mam please put your spex while recording,you are prity when you put it.
Video was as usual very useful.
And you are hot and more gorgeous in this haircut.
Are you saldina ?
Because I found you quite different from everyday
I wanna know that are you providing online course for coding?