Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!radar!cadillac!vaughan From: vaughan@puma.cad.mcc.com (Paul Vaughan) Newsgroups: comp.lang.c++ Subject: Re: const in a class Message-ID: Date: 17 Jun 91 15:10:26 GMT References: <1991Jun15.014436.10060@kcbbs.gen.nz> Sender: news@cadillac.CAD.MCC.COM Distribution: comp Organization: MCC CAD Program, Austin, Texas Lines: 32 In-reply-to: glenn@bitstream.com's message of 14 Jun 91 14:05:35 GMT Curiously, as one of g++'s incompatabilities with Cfront and the defacto standard, this is accepted with no errors. class A { public: static const int size = 3; char array[size]; }; I'm not sure just how well it works. Of course, Cfront says [1.66]sunspot) !C CC -c trash.cc CC trash.cc: "trash.cc", line 2: error: initializer for member size "trash.cc", line 5: error: cannot evaluate constant "trash.cc", line 5: error: dimension missing for array A::array 3 errors Anyway, I wouldn't recommend using this, but it suggests a possible solution to the problem assuming it could be implemented and didn't interfere with anything else. -- Paul Vaughan, MCC CAD Program | ARPA: vaughan@mcc.com | Phone: [512] 338-3639 Box 200195, Austin, TX 78720 | UUCP: ...!cs.utexas.edu!milano!cadillac!vaughan ---------------------------------------------------------------------------------- I spent from $3 to $10 today to pay interest on the national debt. How about you? ----------------------------------------------------------------------------------