TIP: Click on subject to list as thread! ANSI
echo: c_plusplus
to: DARIN MCBRIDE
from: NEIL HELLER
date: 1997-03-17 19:00:00
subject: STATIC? SAY WHAT?

DM> class c
DM> {
DM> public: // for simplicity
 
DM>   static void foo();
DM>   void bar();
DM> private:
DM>   static int foo_val;
DM>   int bar_val;
DM> };
DM> c::bar_val : from anywhere in namespace c with a valid object of
DM> type c.  This includes foo() _IFF_ foo() has a valid c object.  It
DM> can then have c_obj.bar_val directly, it has "access" to the
DM> private members since it is itself a member of the class.
Can you think of any situations in which this method of access to the
value of bar_val is the most preferred or the only way?  Do you think
this method of access of the value of bar_val is in keeping with the
spirit of C++?  I'm just curious?
BTW, when is it ever really necessary (not just possible) to use
double-colons outside of method headers?
 * KWQ/2 1.2i * 
--- TMail v1.31.5
---------------
* Origin: Diablo Valley PCUG-BBS, Walnut Creek, CA 510/943-6238 (1:161/55)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.