Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!decwrl!uunet!taumet!steve From: steve@taumet.com (Stephen Clamage) Newsgroups: comp.lang.c++ Subject: Re: const in a class Message-ID: <768@taumet.com> Date: 14 Jun 91 14:28:10 GMT References: <1991Jun15.014436.10060@kcbbs.gen.nz> Organization: Taumetric Corporation, San Diego Lines: 21 Chris_Sullivan@kcbbs.gen.nz (Chris Sullivan) writes: >I want to be able to declare a local constant in a class ie a constant >whose scope is restricted to the class... >class C { > const int size = 1000; > char array[size]; > ... > } Unfortunately, this is not supported in C++. The best you can do is to declare an enum: class C { enum { size = 1000 }; char array[size]; ... }; -- Steve Clamage, TauMetric Corp, steve@taumet.com