Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!ucsd!orion.cf.uci.edu!uci-ics!news From: schmidt@zola.ics.uci.edu (Doug Schmidt) Newsgroups: comp.lang.c++ Subject: Re: multi-dimension vectors of objects of a class Message-ID: <1989Sep7.204332.10850@paris.ics.uci.edu> Date: 7 Sep 89 20:43:32 GMT References: <1579@cbnewsd.ATT.COM> <4082@pegasus.ATT.COM> <333@cubmol.BIO.COLUMBIA.EDU> Sender: news@paris.ics.uci.edu (Network News) Reply-To: schmidt@zola.ics.uci.edu (Doug Schmidt) Organization: University of California, Irvine - Dept of ICS Lines: 32 In-reply-to: ping@cubmol.BIO.COLUMBIA.EDU (Shiping Zhang) In article <333@cubmol.BIO.COLUMBIA.EDU>, ping@cubmol (Shiping Zhang) writes: >Is there a way to declare a multi-dimension vector of objects of >a class? I just installed g++ on sun3 with os4. I got error messages >if I declared a multi-dimension vector of a class object, for example, > >class vector { >//.. >public > vector(); // with no argument; > ~vector(); >//.. >} >vector v1[4]; // works ok >vector v2[2][2]; // get fatal error message on this line > >I want know if c++ does not support multi-dimension vectors of class >objects at all or only g++ doesn't, or simply it's a bug in the g++ I >just installed. I appreciate any help on this matter. Thank. The latest version of g++ (a 1.36 beta) compiles this without any problems. It must have been a bug with previous releases. You can get a copy of the beta g++ from labrea.stanford.edu, in the ~ftp/pub/gnu directory. The file is called g++.xtar.Z. There is also a beta release of libg++ 1.36 there also, called libg++.xtar.Z. Doug -- schmidt@ics.uci.edu (ARPA) | Per me si va nella citta' dolente. office: (714) 856-4043 | Per me si va nell'eterno dolore. | Per me si va tra la perduta gente. | Lasciate ogni speranza o voi ch'entrate.