Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!uwm.edu!zaphod.mps.ohio-state.edu!sol.ctr.columbia.edu!emory!stiatl!srchtec!johnb From: johnb@srchtec.UUCP (John Baldwin) Newsgroups: comp.lang.c++ Subject: Simple C++ Question Summary: What does static class do? Message-ID: <155@srchtec.UUCP> Date: 25 Jul 90 21:01:20 GMT Distribution: usa Organization: search technology, inc. Lines: 29 Short question here: I am working on a large project involving C++. There are no "C++ gurus" here (a few of us, myself included, are very familiar with C, however). There are some code fragments we're trying to understand, one of which includes a class of storage-type "static". The declaration looks like this: static class Widget { . . // data and member functions here . }; We have checked Lippman's book, the Stroustrup text, and Hansen's "answer book" to no avail. Please forgive me asking this on the net, but what does it do?? My guess is that you get a class which you can inherit from, but there's only one instance of it, and all the derived classes can access this instance. Please respond by email only, to save net bandwidth. I'll post the answer if anyone's curious. Sorry if this is obvious folklore-type knowledge; we need to come up to speed very quickly. Thanks! -- John T. Baldwin | johnb@srchtec.uucp Search Technology, Inc. | johnb%srchtec.uucp@mathcs.emory.edu standard disclaimer: | ...uunet!samsung!emory!stiatl!srchtec.. opinions and mistakes purely my own. | ...mailrus!gatech!stiatl!srchtec...