Real quick question about operator overloading

This is a discussion on Real quick question about operator overloading within the C++ Programming forums, part of the General Programming Boards category; Hi guys, I am writing a program where I need to overload the + and - operators to add or ...

  1. #1
    Registered User
    Join Date
    Sep 2009
    Location
    Murfreesboro, TN
    Posts
    5

    Real quick question about operator overloading

    Hi guys,

    I am writing a program where I need to overload the + and - operators to add or subtract data in a linked list and put this data into a new linked list.

    Some of the code has been provided and one of the things that gets passed to the add or subtract functions is called *this. Is *this what is on the left hand side or what does *this represent?

    Thanks guys.

  2. #2
    3735928559
    Join Date
    Mar 2008
    Location
    RTP
    Posts
    839
    passing *this in a function passes a reference or copy of the object whose method is currently being executed into the function being called.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Real Basic Question
    By meblkbr in forum C Programming
    Replies: 6
    Last Post: 05-31-2005, 08:10 PM
  2. very quick question.
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 07-24-2002, 04:48 AM
  3. quick question
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 07-22-2002, 05:44 AM
  4. Quick Question Regarding Pointers
    By charash in forum C++ Programming
    Replies: 4
    Last Post: 05-04-2002, 12:04 PM
  5. Quick question: exit();
    By Cheeze-It in forum C Programming
    Replies: 6
    Last Post: 08-15-2001, 06:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21