home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / cplus / 16156 < prev    next >
Encoding:
Text File  |  1992-11-12  |  672 b   |  29 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!debbie!johnh
  3. From: johnh@tt.com (John Hasselkus)
  4. Subject: static data members of private types impossible?
  5. Message-ID: <1992Nov12.151014.10610@debbie>
  6. Sender: news@debbie
  7. Nntp-Posting-Host: debbie
  8. Organization: Telecommunications Techniques Corporation, Germantown MD
  9. Date: Thu, 12 Nov 1992 15:10:14 GMT
  10. Lines: 17
  11.  
  12. How do you define a static data member of a private type?  For example:
  13.  
  14. class A {
  15.   private:
  16.     enum FOO {
  17.       FOO_1,
  18.       FOO_2
  19.     };
  20.     static FOO foo;
  21. };
  22.  
  23. A::FOO A:foo;    // <- Compiler won't let you use private types out here
  24.  
  25. Is this impossible?  Thanks for any inputs.
  26. -- 
  27. John Hasselkus
  28. johnh@tt.com
  29.