Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!bronze!nsundare@copper.ucs.indiana.edu From: nsundare@copper.ucs.indiana.edu (Neelakantan Sundaresan) Newsgroups: comp.lang.c++ Subject: Initializing static area of classes.... Message-ID: <1991Mar4.224519.6434@bronze.ucs.indiana.edu> Date: 4 Mar 91 22:45:11 GMT Sender: Organization: Indiana University Lines: 18 I am trying to solve the problem of initializing the static(shared) data area of a class type. Basically I would like this initializtion and any other house keeping stuff done, when the first object instance of that class is 'construct'ed. Is there a neat way to achieve this? What I have been doing is define a global variable of that class, whose constructor is different from any others for that class (in the sense of number or types of parameters it takes) and in the code for this constructor do the initialization. I guess this is not a very clean way to do it, Is there a better way to solve this.... Thanks for any ideas, Neel Sundaresan (A C++ novice)