C++ Overloading Math Operator in Class [5]

Sdílet
Vložit
  • čas přidán 13. 09. 2024
  • Learn how to overload arithmetic operators for your classes. Learn through writing a sample class that includes operator+, operator*, etc in this C++ tutorial for beginners written with Visual Studio 2022 C++ .
    // Join the new Programming for Everyone Community Forum:
    professorhank....
    // Learn More //
    More About Classes playlist: • CH14: More About Classes
    // Consider supporting this channel in multiple ways
    paypal.me/hank...
    Bitcoin: 177wfkQwzXiC8o2whQMVpSyuWUs95krKYB

Komentáře • 6

  • @gingerman28
    @gingerman28 Před měsícem +1

    Sorry maybe I missed something but 1.85 * 1.86 = 3.44?

  • @ares106
    @ares106 Před rokem +2

    You’ve got to be pretty crazy to overload your operators. C++ is already hard enough with the default ones.

  • @nicholastreurnicht
    @nicholastreurnicht Před 26 dny +1

    Barely an inconvenience 😂

  • @IMdrummerTab
    @IMdrummerTab Před rokem

    how is simplify working if it isnt being called?

    • @ProfessorHankStalica
      @ProfessorHankStalica  Před rokem +1

      Functions can call functions. If the function call is inside of operator+, then when x + y executes, operator+ executes, and calls function simplify.