Try this:
class foo { bar _bar; public: bar &returnBar(void) { return _bar; } };
This returns a direct reference to _bar that can be both assigned to, and read from.
foo a; bar b; b=a.returnBar(); a.returnBar()=b;
The main issue with this is that there's no way to detect when _bar is being read or modified. Using a wrapper class the overrides those activities is the closet way to a true property in C++.
-- Ben Combee, DTS technical lead, PalmSource, Inc. Read "Combee on Palm OS" at http://palmos.combee.net/
-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/
