private static
    Michael Hoennig 
    Michael_Hoennig at hh.maus.de
       
    Tue Jun 18 05:46:00 AEST 1991
    
    
  
Hi Bob,
BB>1.  How do I explicitly initialise a private static member variable?
You _MUST_ define it like this:
class fred
{
        static int fd;          // file descriptor; 0 is legit
};
int fred::fd = -1;
BB>2.  The following pair of statements appears to be legitimate in C,
BB>    but not in C++:
BB>        typedef char byte;
BB>        unsigned byte thing;
This would be a bug in your C compiler. It treats typedef's as
defines. But typedefs aren't defines!
Adios
--
Michael Hoennig -- Dobbelersweg 45 -- D-2000 Hamburg 26 -- ++49 40 219 24 58
office: mi1 at starlab.UUCP -- ++49 40 23 08 56 (StarDivision Hamburg)
    
    
More information about the Comp.lang.c
mailing list