From 7943379522175605960
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f78e5,e191db47f821e732
X-Google-Attributes: gidf78e5,public
From: "Peter Mancini" <peter_mancini@Sp-am-blo-ck.onesource.com>
Subject: Re: multidimensional array using stl vector
Date: 1997/07/03
Message-ID: <01bc86ed$78217140$ef0810ac@jubilex>#1/1
X-Deja-AN: 254307558
References: <Pine.GSO.3.96.970630204810.3711A-100000@lise.physik.TU-Berlin.DE> <33B8B20B.7CC8793A@master.grad.hr>
X-Original-Date: 2 Jul 1997 13:33:52 GMT
Organization: Shore.Net/Eco Software, Inc; (info@shore.net)
X-Auth: PGPMoose V1.1 PGP comp.std.c++ iQBVAwUBM7vOrUy4NqrwXLNJAQEg3AH/a3lYiiloQk0HhvsYd66ENcK4b64ehvSC W1KaO8TTFjjOO4t1PE37X73467EEaDfiH9h/GvPFA3SgG5Me2s53ag== =zT2j
Newsgroups: comp.std.c++
Originator: austern@isolde.mti.sgi.com


That's a really interesting solution.  I have a couple of question about
the solution and a general question though.

In the constructor you have elems initialized with:
elems (r*c, val)
How does that work with templates?  I assume that the compiler treats it as
vector<r*c, val) which in VC++ would use:
explicit vector(size_type n, const T& v = T(), const A& al = A());
In VC++ 4.x you would need to indicate the allocator class for A however.

OK, so I just answered my own question, but the second is still a mystery
for me.

Is vector a typename?  is vector<int> a typename?  I still don't get why I
can't do vector< vector<int> > multidim_array_of_int;

--Pete
---
[ comp.std.c++ is moderated.  To submit articles: Try just posting with your 
                newsreader.  If that fails, use mailto:std-c++@ncar.ucar.edu
  comp.std.c++ FAQ: http://reality.sgi.com/austern/std-c++/faq.html
  Moderation policy: http://reality.sgi.com/austern/std-c++/policy.html
  Comments? mailto:std-c++-request@ncar.ucar.edu 
]



