home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / cplus / 18562 < prev    next >
Encoding:
Text File  |  1992-12-30  |  1.1 KB  |  42 lines

  1. Newsgroups: comp.lang.c++
  2. Path: sparky!uunet!paladin.american.edu!darwin.sura.net!max.fiu.edu!ege
  3. From: ege@max.fiu.edu (Dr. Raimund K. Ege)
  4. Subject: Re: More Gnu C++ fun
  5. Organization: Florida International University, Miami
  6. Date: Wed, 30 Dec 1992 21:30:26 GMT
  7. Message-ID: <C03D2r.Hn1@fiu.edu>
  8. References:  <1992Dec30.195714.9824@adimail.uucp>
  9. Sender: news@fiu.edu (Usenet Administrator)
  10. Lines: 30
  11.  
  12. In article <1992Dec30.195714.9824@adimail.uucp>, tel@adimail.uucp (Terry Monks) writes:
  13. |> This minimal program
  14. |> 
  15. |> 
  16. |> class node 
  17. |> {
  18. |> public:
  19. |>   static int level;
  20. |>   
  21. |>   node(){};
  22. |> };
  23.  
  24.     int node::level;
  25. |> 
  26. |> main()
  27. |> {
  28. |>   node::level=1;
  29. |> }
  30. |> 
  31. |> Any clues?
  32.  
  33. once you add the line "int node::level;", then g++ will compile and link.
  34. There is a paragraph in the g++ FAQ that mentions the details why this is
  35. needed.
  36.  
  37. -- 
  38. Raimund K. Ege                             School of Computer Science
  39.                                              Florida Int'l University
  40. ege@scs.fiu.edu           (305) 348-3381              University Park
  41. ege@servax.bitnet     FAX (305) 348-3549              Miami, FL 33199
  42.