Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!pacbell.com!iggy.GW.Vitalink.COM!lll-winken!aunro!alberta!arcsun.arc.ab.ca!covert!bramwell From: bramwell@Datap.ab.ca (Bob Bramwell) Newsgroups: comp.lang.c++ Subject: 2 quick questions Message-ID: <1991Jun12.013440.20494@Datap.ab.ca> Date: 12 Jun 91 01:34:40 GMT Reply-To: bramwell@covert.UUCP (Bob Bramwell) Organization: Datap Systems, Calgary, Alberta, Canada Lines: 25 These are very short questions. Maybe the answers will be too :-) 1. How do I explicitly initialise a private static member variable? For example: class fred { static int fd; // file descriptor; 0 is legit }; I'd like fred::fd to start life as -1 before the first ever constructor invocation on a fred object. Can this be done? 2. The following pair of statements appears to be legitimate in C, but not in C++: typedef char byte; unsigned byte thing; Obviously what I want is a synonym for char, but C++ doesn't like me trying to make it 'unsigned' as well. Why not? I look forward to your answers. Replies via E-mail may not work due to a (possibly) broken domain name server upstream of us. -- Bob Bramwell Snail: 10th Floor, | 940 6 Av SW, | "I love my country, 403/237-9500w Calgary, AB, | but I fear my government" 403/283-7367h T2P 3T1, Canada |