Solved

dynamic 2d array

Posted on 2002-03-19
2
172 Views
Last Modified: 2010-04-02
is there any container that can act like a dynamic 2d array..which size could be changed ?

0
Comment
Question by:prinx
2 Comments
 
LVL 2

Expert Comment

by:LoungeLizard
ID: 6881993
Do you want both dimensions to be dynamically changeable? I don't think there is a standard STL class that can do that, but it should be easy enough to build your own. Just use a list of lists or something similar. If you want to have the same "feel" as a traditional array you can put that in your own class where you overload []

0
 
LVL 5

Accepted Solution

by:
proskig earned 50 total points
ID: 6882237
well, it is definitely not so easy as it seems to be, but definitely doable. See the following link
http://www.cuj.com/articles/2000/0012/0012c/0012c.htm
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
What is C++ STL?: STL stands for Standard Template Library and is a part of standard C++ libraries. It contains many useful data structures (containers) and algorithms, which can spare you a lot of the time. Today we will look at the STL Vector. …
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

863 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now