Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!uwm.edu!zaphod.mps.ohio-state.edu!brutus.cs.uiuc.edu!jarthur!uci-ics!rfg From: rfg@ics.uci.edu (Ronald Guilmette) Newsgroups: comp.lang.c++ Subject: Re: unbounded static array member Message-ID: <25F8D927.13592@paris.ics.uci.edu> Date: 10 Mar 90 10:38:31 GMT References: <11024@saturn.ucsc.edu> <5104@odin.SGI.COM> Reply-To: rfg@ics.uci.edu (Ronald Guilmette) Organization: UC Irvine Department of ICS Lines: 25 In article <5104@odin.SGI.COM> shap@delrey.sgi.com (Jonathan Shapiro) writes: >In article <11024@saturn.ucsc.edu> daniel@saturn.ucsc.edu (Daniel Edelson) writes: >>Is there or should there be a syntax for declaring a static array >>member whose length is determined by the length of its initializer list? >> >>e.g., >> >> struct S >> static int array[]; // Error, bound required >> }; >> >> int S::array[] = { 1, 2, 3, 0}; > >No. Such an array is not (by definition) fixed size given only the >declaration to work from. In C/C++, that's what pointers are for. ... >On the other hand, it's definitely a marginal problem, and this idea >is at best half-baked. Apparently the people at AT&T disagree, since it has been implemented. // Ron Guilmette (rfg@ics.uci.edu) // C++ Entomologist // Motto: If it sticks, force it. If it breaks, it needed replacing anyway.