Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!cmcl2!brl-adm!nlm-mcs!nlm-vax!lef From: lef@nlm-vax.UUCP Newsgroups: comp.lang.c++ Subject: static member data initialization query Message-ID: <2464@nlm-vax.arpa> Date: Thu, 14-May-87 11:28:02 EDT Article-I.D.: nlm-vax.2464 Posted: Thu May 14 11:28:02 1987 Date-Received: Thu, 21-May-87 02:40:50 EDT Organization: NLM/LHNCBC, Bethesda, Md. Lines: 25 Hello, I am rather new to C++ and have a question about the initialization of static member data. Given a class that has some static data associated with it, that is, data shared by all instances rather than replicated, what is the best way to initialize that data? The following was my first thought class date { static char *mmm[12]={"jan","feb","mar",...}; ... } but this generates a compiler message "initialization of static members unimplemented" (or something like that). I can't seem to see how to initialize the data with a constructor given that you only want it to happen once, not once for every instance. The only other alternative I can see is to use static global data. Am I missing something or is this the preferred way to do this? thanks, fitz l e fitzpatrick national library of medicine bethesda, md