Xref: utzoo comp.lang.c:12606 comp.lang.c++:1591 Path: utzoo!attcan!uunet!lll-winken!lll-tis!helios.ee.lbl.gov!pasteur!ucbvax!ucsd!orion.cf.uci.edu!paris.ics.uci.edu!beaver.ics.uci.edu!schmidt From: schmidt@beaver.ics.uci.edu (Doug Schmidt) Newsgroups: comp.lang.c,comp.lang.c++ Subject: const comparison in C and C++ Message-ID: <709@paris.ICS.UCI.EDU> Date: 15 Sep 88 06:59:00 GMT Sender: news@paris.ics.uci.edu Reply-To: schmidt@beaver.ics.uci.edu (Doug Schmidt) Organization: University of California, Irvine - Dept of ICS Lines: 21 Hi, Would someone please explain to me the rationale behind C++'s allowance of ``const's'' objects for use with specifying array size declarations, as opposed to ANSI-C's reject of this construct? For example, the following is legal C++: ---------------------------------------- const int Bar = 100; int Foo[Bar]; // declares an array of 100 ints ---------------------------------------- However, this does not work with the ANSI-Cesque compilers I've tried (gcc, for example). I'm interested to know the conceptual differences between the two languages on this point. thank you, Doug Schmidt