Operator Overloading Using Friend Functions | C++ Tutorial

Sdílet
Vložit
  • čas přidán 13. 09. 2024

Komentáře • 18

  • @jeffnagy4778
    @jeffnagy4778 Před rokem +7

    I have a much better understanding friend functions and their use in operator overloading. Thank you!

    • @PortfolioCourses
      @PortfolioCourses  Před rokem +1

      You're welcome Jeff, I'm very glad to hear that it helped you! 🙂

  • @moomi1427
    @moomi1427 Před rokem +3

    Hands down the best channel out there.
    Thankyou!

  • @timauberer4314
    @timauberer4314 Před 10 měsíci +1

    Such a great tutorial! You saved the day!

    • @PortfolioCourses
      @PortfolioCourses  Před 10 měsíci +1

      You’re welcome, I’m glad it was helpful for you! :-)

  • @Ptr-NG
    @Ptr-NG Před 8 měsíci

    I am ex fortran lover, and wanna impress myself in messing with c++ :) ...
    Though overlwelmed given the amount of stuff to learn, your courses are clear... and for that, BIG thank you!

  • @fbi873
    @fbi873 Před 2 lety +1

    Amazing explanation 🌹
    Subscribed

  • @dabgotra
    @dabgotra Před 3 měsíci

    Thanks

  • @BilalBerek-tl3tq
    @BilalBerek-tl3tq Před rokem +1

    great job sir

  • @ValliNayagamChokkalingam

    Thanks once again Professor! So this->count and using count directly are the same thing, right?

  • @Ptr-NG
    @Ptr-NG Před 8 měsíci

    The friend function can be any function? Where should it be defined? I mean, can it be a member (private or protected) of class A and friend of class B?

  • @jjfan4014
    @jjfan4014 Před 9 měsíci

    The friend function for + operator overloading has compiling error, error C2440: 'return': cannot convert from 'Counter' to 'Counter'. I have to modify it:
    Counter operator+(Counter c1, Counter c2)
    {
    Countera;
    a.inputValue = c1.inputValue + c2.inputValue;
    return a;
    }
    I used cpp file and header file.

  • @realj7513
    @realj7513 Před 6 měsíci

    hi what IDE do you use?

  • @BilalBerek-tl3tq
    @BilalBerek-tl3tq Před rokem +1

    i have subscribed