Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!rice!uw-beaver!mit-eddie!andante!alice!bs From: bs@alice.att.com (Bjarne Stroustrup) Newsgroups: comp.lang.c++ Subject: Re: Constant data tables and classes Message-ID: <20146@alice.att.com> Date: 30 Mar 91 14:05:35 GMT References: <41062@genrad.UUCP> Organization: AT&T Bell Laboratories, Murray Hill NJ Lines: 20 > I'm relatively new to C++, but have signifigant amounts of > experience with C. It appears that C++ intentionally prohibits static > const tables within classes. It would seem to me that allowing these > would provide a convenient way of hiding constant data tables used by > a class from outside use rather than using file scoped statics. Does > anyoune know why this is disallowed? Is this what you want?: class X { static const Table t; // ... }; const Table X::t = { /* lots of stuff */ }; If so, it works.