note 28438 deleted from language.variables by nlopess

From: Date: Fri, 24 Dec 2004 20:33:12 +0000
Subject: note 28438 deleted from language.variables by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-82273@lists.php.net to get a copy of this message
Note Submitter: gabriel at bumpt dot net ---- I know this is not a C++ newsgroup, but I just wanted to get things right, after the comment of "someone at somewhere dot com". The C-like piece of code provided by stlawson DOES use a pointer, and NOT a C++ reference. "someone at somewhere dot com" got confused because type declaration was obviously omitted for clarity reasons. A reference in C++ is almost a type qualifier: a variable is of type "reference to objects of class MyClass". Therefore, one cannot assign &myObj to a variable declared as a "reference to objects of class MyClass". &myObj really identifies a pointer to myObj, and dereference (using * or ->) is requiered.

« previous php.notes (#82273) next »