C++ FUNCTIONS (2020) - What is function overloading? PROGRAMMING TUTORIAL

Sdílet
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

Komentáře • 70

  • @CodeBeauty
    @CodeBeauty  Před 3 lety +18

    📚 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.

  • @dianamedina9040
    @dianamedina9040 Před 3 lety +37

    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

    • @CodeBeauty
      @CodeBeauty  Před 3 lety +3

      Thank you Diana and good luck! 🤞🥰

  • @selamweldu3974
    @selamweldu3974 Před 3 lety +10

    The only CZcamsr that made me understand coding ! Kudos to you ❤️

  • @hell0kitje
    @hell0kitje Před 4 lety +27

    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

    • @CodeBeauty
      @CodeBeauty  Před 4 lety +20

      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 🤓

    • @user-lx6td6ri2c
      @user-lx6td6ri2c Před 3 lety +8

      So, did you get a job?

    • @t6hp
      @t6hp Před 2 lety

      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.

    • @paula19335
      @paula19335 Před rokem +1

      Heeeloo!? Did you get a job or not?

    • @Hoptronics
      @Hoptronics Před 11 měsíci

      We need an update dood. You get a programming gig yet?

  • @patrickmayer9218
    @patrickmayer9218 Před 2 lety +2

    *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!

  • @AlexisSuarezDev
    @AlexisSuarezDev Před 3 lety +9

    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

  • @marichiesTech
    @marichiesTech Před 4 lety +2

    You've really help me on your channel. I didn't understand it in class. Good teacher.

  • @afnanahmed9410
    @afnanahmed9410 Před 6 měsíci +1

    Thanks dear

  • @zbysiu100
    @zbysiu100 Před 2 lety

    I have just discovered your tutorial. A very good for begeinners. Regards from Poland.

  • @daltonmoye4847
    @daltonmoye4847 Před 3 lety +1

    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.

  • @riazbaloch1312
    @riazbaloch1312 Před 10 měsíci

    totally different look awasome!!!

  • @abhishekc3556
    @abhishekc3556 Před 2 lety

    Thank you ma'am.

  • @ballpool-qq8hr
    @ballpool-qq8hr Před 2 lety +1

    Love You Teacher 💖💖💖

  • @MASUMBILLAH-nc6ln
    @MASUMBILLAH-nc6ln Před rokem

    Love your tutorials . They are very informative and easy to understand🥰

  • @subee128
    @subee128 Před 2 lety

    Thanks

  • @MrAdeel02
    @MrAdeel02 Před rokem +1

    Thanks from Pakistan!

  • @I_Yogesh_Whetwar
    @I_Yogesh_Whetwar Před 3 lety

    Love from india❤️❤️🔥🔥
    Your teaching method is osm mam 👌👌keep it up this nyc work
    Btw thanku very much🙏🙏

  • @madhubankhatri2525
    @madhubankhatri2525 Před rokem

    u r looking amazing in this video.

  • @simoncaso8910
    @simoncaso8910 Před 3 lety

    Una clase muy didáctica !!! Gracias.

  • @kalabmarkos3149
    @kalabmarkos3149 Před 3 lety +1

    It's really amazing what you are doing. When will you present about Arrays.

    • @CodeBeauty
      @CodeBeauty  Před 3 lety +1

      I already did. Please take a look at my "Data structures" playlist 🤗🤗

  • @shahbros1498
    @shahbros1498 Před 3 lety

    It was fantastic. Thank you

  • @ernestozanabria3343
    @ernestozanabria3343 Před 3 lety +1

    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

  • @trlavalley9909
    @trlavalley9909 Před 5 měsíci

    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.

  • @alifawzi8197
    @alifawzi8197 Před 3 lety

    thank you soooo much miss

  • @photogyulai
    @photogyulai Před rokem

    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.

  • @roros2512
    @roros2512 Před 3 lety +1

    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

    • @CodeBeauty
      @CodeBeauty  Před 3 lety +1

      Maybe this video can help you 😃😃
      czcams.com/video/qrJjFN4Igfw/video.html

    • @roros2512
      @roros2512 Před 3 lety +2

      @@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}

  • @treyespnautta
    @treyespnautta Před 10 měsíci

    you ate fren!!!!!!!!!!!!

  • @oz2770
    @oz2770 Před 4 lety +1

    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.

    • @CodeBeauty
      @CodeBeauty  Před 4 lety +1

      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 🤔

    • @oz2770
      @oz2770 Před 4 lety +1

      @@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.

  • @halukaktas8502
    @halukaktas8502 Před 2 lety

    Very helpful, but if the called functions each were doing different math operations, not only the sums, that would be more clarifying.

  • @uguryucestudent281
    @uguryucestudent281 Před 2 lety

    When you wrote the ur code in line, what do you do to make better readable? (i.e what is shortcut?) :)

  • @AnkitThakur-vc4gz
    @AnkitThakur-vc4gz Před 2 lety

    Mam Why you use system("pause>0"); ?

  • @indiangigachad777
    @indiangigachad777 Před 3 lety

    can you make a vid explaining assignment operator overloading / copy constructors?

  • @andyvalentine8505
    @andyvalentine8505 Před 4 lety

    Please do a video about scope resolution operator.

  • @pranavgoel29
    @pranavgoel29 Před 3 lety

    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.

  • @mcaddit6802
    @mcaddit6802 Před 3 lety +1

    Have you uploaded videos on operator overloading?

    • @CodeBeauty
      @CodeBeauty  Před 3 lety

      Yes :D czcams.com/video/BnMnozsSPmw/video.html

  • @barenddevilliers4934
    @barenddevilliers4934 Před 2 lety

    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?

    • @day4834
      @day4834 Před 2 lety

      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).

  • @alexandrachyu
    @alexandrachyu Před 2 lety

    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

  • @Timo-Epis
    @Timo-Epis Před rokem

    Overloaded functions are not differentiated based on the return type.

  • @temirkhanamanbaev42
    @temirkhanamanbaev42 Před 3 lety

    Seems to be overloading it is the type for all occasions?

  • @faithzhuwakinyu9602
    @faithzhuwakinyu9602 Před rokem

    What if you want to get the values from the keyboard9

    • @christopherstarks
      @christopherstarks Před rokem

      Pass by reference or you shoud esseniatlly place the variables in memory and use a pointer to pull the data back where necessary.

  • @TonyAquaro
    @TonyAquaro Před 3 lety

    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

  • @savin1793
    @savin1793 Před 3 lety +1

    Mam please put your spex while recording,you are prity when you put it.

  • @al-meezanacademy4722
    @al-meezanacademy4722 Před 3 lety

    Video was as usual very useful.
    And you are hot and more gorgeous in this haircut.

  • @surajrana7570
    @surajrana7570 Před 3 lety

    Are you saldina ?

    • @surajrana7570
      @surajrana7570 Před 3 lety

      Because I found you quite different from everyday

    • @surajrana7570
      @surajrana7570 Před 3 lety

      I wanna know that are you providing online course for coding?