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

 NH> Can you think of any situations in which this method of access to the
 NH> value of bar_val is the most preferred or the only way?  Do you think
 NH> this method of access of the value of bar_val is in keeping with the
 NH> spirit of C++?  I'm just curious?
 NH> BTW, when is it ever really necessary (not just possible) to use
 NH> double-colons outside of method headers?
We did that in my com-sci class about 3 weeks ago, it could be useful for 
things like keeping track of the number of instances of a class.  You 
initialize the variable at the start of the program, then the constructor you 
increment the count and in the destructor you decrement it.  It could be used 
for things like keeping track of open windows (if it's a window class), or 
other similar applications where the number of instances is important to know 
or control.
--- Maximus/2 3.00
---------------
* Origin: LutherNet Christian BBS (1:153/7036)

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™.