Thread: Real quick question about operator overloading

  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
    838
    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, 07:10 PM
  2. very quick question.
    By Unregistered in forum C++ Programming
    Replies: 7
    Last Post: 07-24-2002, 03:48 AM
  3. quick question
    By Unregistered in forum C++ Programming
    Replies: 5
    Last Post: 07-22-2002, 04:44 AM
  4. Quick Question Regarding Pointers
    By charash in forum C++ Programming
    Replies: 4
    Last Post: 05-04-2002, 11:04 AM
  5. Quick question: exit();
    By Cheeze-It in forum C Programming
    Replies: 6
    Last Post: 08-15-2001, 05:46 PM