I don't know exactly what you mean. You mean this?Originally posted by AfricanDude
How do I populate a 3-d stl vector using a for statement?
thank you
If you are talking about how do you size each of the dimensions, then that is a different question.Code:Int3D My3DArray(10, Int2D(10, Int1D(10,0))); int size1 = My3DArray.size(); for ( int i = 0; i < size1; ++i ) { int size2 = My3DArray[i].size(); for (int j = 0; j < size2; ++j ) { int size3 = My3DArray[i][j].size(); for ( k = 0; k < size3; ++k ) MyArray[i][j][k] = 15; } }
Regards,
Paul McKenzie




Reply With Quote