0

I'm trying to create a 3D vector with dynamic vectors of char.
I mean like this:

3dVect is only one 3D vector

3dVect[0][0][12]
3dVect[0][1][5]
3dVect[1][0][6]
3dVect[1][1][9]
3dVect[1][2][8]
...

this mean: 3dVect[0][][] consists of 2 2D vectors, and the 2D vectors have different sizes.

I have read the thred http://www.daniweb.com/forums/thread136351.html
and tried ArkM's way, to use STL inheritance (just switched string to char).

It works fine to create a 3D vector where all have the same dimensions, like this:

3dVect[3][0][7]
3dVect[3][1][7]
3dVect[3][2][7]
...


But I have managed to erase every empty element, but I can't erase individual vectors.

I'v come so far:
Ex.

3dVect[0][0][]: {h, e, l, l , o}
3dVect[0][1][]: {}
3dVect[0][2][]: {}
...


My question: Is it possible to erase a 1D vector form a 3D vector? :-/

Please help!

1
Contributor
1
Reply
2
Views
8 Years
Discussion Span
Last Post by C++ Obliviator
This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.