Skip to main content
gamedev.net
🔒 Locked

Multidimensional Vectors?

Started by RogueFiend 2 replies 750+ views
Original Post
RogueFiend
RogueFiend
Is there a way to create multidemsional vectors? or is there another stl conainer hat funcions like multidensional arrays except with a dynamic size?.
How many times do i have to punch the fucking monkey?
Qoy
Qoy
As far as I know, the definition of vector is such that it is only one dimensional.
Atavist
Atavist
Well...
The answer could be as simple as making a list of a class that is multi dimensional.

The list stores one array, but each element gives you access to coresponding elements.

I think therefore I code.
Just because the church was wrong doesn't mean Galileo wasn't a heretic.It just means he was a heretic who was right.
Eck
Eck
Do you mean something like:
    
std::vector<std::vector<int> > 2dVector;


Make sure you put the space between the two > > or you just made the input operator. >>

Later,
Eck

Edited by - Eck on September 1, 2000 11:40:23 AM

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.