Cincai Patron wrote:
On 05 March 2004 pm 17:00, John Lamb wrote:
Just want to add that in C++, pointer to a non-static member function has the "this" hidden parameter.
I don't think I understood that one. :-/
What I mean is, to have a pointer to a member function, we must include the object as the first parameter.
Good point. It's worthwhile emphasising that you cannot use a pointer to a member without an object (though you can declare one). I learned this one the hard way.
I confused myself thinking about the equivalence of x and this->x. :-)
-- JDL I'm not sure if it's related, but it seems close. Stroustrup uses ::operator+(X(1,1.0)); in a comment to suggest the use of the globally defined addition operator. See section 11.2.1 of TC++PL, SE. In JavaScript
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Friday 05 March 2004 12:58 pm, John Lamb wrote: there is always a mother of all objects object. I wonder if the same is true of C++. IOW, are all global variables actually members of an object? I'm not much closer to my original goal of determining a set of pointer axioms. I believe it is correct to consider an array identifier to be a constant pointer to the type of the array, and pointing to the first element of that array. I started to create a parser that would diagram the precedence of pointer expressions, but there are so many things I don't understand about C++, I decided to step back from that effort. STH -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQFATQVcwX61+IL0QsMRAq0WAKDZo+SqUX9KT/0iFC70RkoaPwOqSgCgkZs+ tWb+vryqW2HoyTPIoqXXQ0w= =EOLf -----END PGP SIGNATURE-----