home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / lang / cplus / 18157 < prev    next >
Encoding:
Text File  |  1992-12-18  |  940 b   |  39 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!cs.utexas.edu!uwm.edu!ux1.cso.uiuc.edu!cs.uiuc.edu!sparc0b!pjl
  3. From: pjl@cs.uiuc.edu (Paul Lucas)
  4. Subject: Re: Static vars in member functions
  5. Message-ID: <BzF8Cs.25x@cs.uiuc.edu>
  6. Sender: news@cs.uiuc.edu
  7. Organization: University of Illinois at Urbana-Champaign
  8. References: <1992Dec13.185540.20212@math.ufl.edu>
  9. Date: Thu, 17 Dec 1992 20:46:04 GMT
  10. Lines: 27
  11.  
  12. In <1992Dec13.185540.20212@math.ufl.edu> x9999bvj@maple.circa.ufl.edu writes:
  13.  
  14.  
  15. >When calling a function of a class with a static variable declared in it,
  16. >what is the standardized behaviour for that variable?
  17.  
  18. *****>    The same as for a non-member-function.
  19.  
  20. >E.g.
  21.  
  22. >class Foo
  23. >{
  24. >   public:
  25. >      void Blah( void );
  26. >};
  27.  
  28. >void Foo::Blah( void )
  29. >{
  30. >static int i;
  31.  
  32. >   i++;
  33. >};
  34.  
  35. -- 
  36.     - Paul J. Lucas                University of Illinois    
  37.       AT&T Bell Laboratories        at Urbana-Champaign
  38.       Naperville, IL            pjl@cs.uiuc.edu
  39.