Operator Overloading Using Friend Functions | C++ Tutorial

Поделиться
HTML-код
  • Опубликовано: 23 ноя 2024

Комментарии • 18

  • @jeffnagy4778
    @jeffnagy4778 2 года назад +7

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

    • @PortfolioCourses
      @PortfolioCourses  2 года назад +1

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

  • @moomi1427
    @moomi1427 Год назад +3

    Hands down the best channel out there.
    Thankyou!

  • @Ptr-NG
    @Ptr-NG 11 месяцев назад

    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!

  • @timauberer4314
    @timauberer4314 Год назад +1

    Such a great tutorial! You saved the day!

    • @PortfolioCourses
      @PortfolioCourses  Год назад +1

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

  • @fbi873
    @fbi873 2 года назад +1

    Amazing explanation 🌹
    Subscribed

  • @jjfan4014
    @jjfan4014 11 месяцев назад

    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.

  • @ValliNayagamChokkalingam
    @ValliNayagamChokkalingam Год назад

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

  • @BilalBerek-tl3tq
    @BilalBerek-tl3tq Год назад +1

    great job sir

  • @Ptr-NG
    @Ptr-NG 11 месяцев назад

    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?

  • @dabgotra
    @dabgotra 6 месяцев назад

    Thanks

  • @BilalBerek-tl3tq
    @BilalBerek-tl3tq Год назад +1

    i have subscribed

  • @realj7513
    @realj7513 8 месяцев назад

    hi what IDE do you use?