Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!ames!odin!johnston From: johnston@odin.ADS.COM (Scott E. Johnston) Newsgroups: comp.lang.c++ Subject: Initialize array of classes with parameterized constructor? Keywords: constructor, array Message-ID: <10518@odin.ADS.COM> Date: 19 Jan 90 16:47:17 GMT Organization: Advanced Decision Systems Lines: 19 Is it possible to directly declare an array of classes that are immediately initialized by a constructor with arguments? If not, why so? I am aware of ways to get around the problem -- my question is if it can be done directly instead. Syntaxes I have tried, and error messages generated by AT&T 2.0: a_class a1[10] (33.4); // error: argument has no type // error: array of functions a_class a1(33.4) [10]; // internal <> // error: bus error (or something nasty like that) ------------------------------------------------------------------------ Scott E. Johnston johnston@ads.com 1500 Plymouth St. (415) 960-7300 Mt. View, CA 94043