Mail Archives: djgpp/1999/09/22/08:52:21
In article <37e869a8 AT news1 DOT prserv DOT net>, "David Grant" <dgrant3 AT ibm DOT net****NO-SPAM> wrote:
>Is there an STL class I can use to represent a 2D array? I need to use an
>STL function because I need to make deep copies easily and use the
>assignment operator and stuff like that, but I don't want to make my own new
>class. I basically want to use a vector STL class but it has to be 2D. I
>need to store double type variables inside. I'm just making a simple 1-file
>program, no functions, just a couple loops, and some numerical computations
>inside.
>
Just use a vector of vectors of double:
vector <vector <double> > myvec;
If you put something in there you can get it with myvec [x][y].
--
Manni
- Raw text -