Thread: the "this" pointer

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    A normal member function has a hidden parameter of
    ClassName * const this
    A const member function has a hidden parameter of
    ClassName const * const this
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  2. #2
    Registered User
    Join Date
    Jun 2005
    Posts
    17
    let me see if i understand this.
    so the this pointer is always a constant pointer(because it points to itself). but wether its a constant pointer to a constant object is dependant upon that const on the right side? That makes sense (as long as im understanding correctly)

    thanks for the info
    Last edited by faze; 06-23-2005 at 11:31 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 1
    Last Post: 03-24-2008, 10:16 AM
  2. Replies: 0
    Last Post: 03-20-2008, 07:59 AM
  3. How did you master pointers?
    By Afrinux in forum C Programming
    Replies: 15
    Last Post: 01-17-2006, 08:23 PM
  4. pointers
    By InvariantLoop in forum C Programming
    Replies: 13
    Last Post: 02-04-2005, 09:32 AM
  5. Problem with "this" pointer
    By Unregistered in forum C++ Programming
    Replies: 4
    Last Post: 02-07-2002, 10:03 AM