Array MADNESS

Started by
10 comments, last by pressgreen 11 years, 1 month ago

Rawest form: create a vector of pointers, each pointer being the head of an individual array of data.

Somewhat better: create a vector of vectors, where the "outer layer" vector is the dynamically-sized group, comprised of 16-element vectors (instead of your 16-element arrays). The way you describe it in your latest reply is correct in that regard, in that you would take the 16 elements, push them into a vector, and then push THAT vector onto the "main" one.

OOD approach: wrap the arrays of information in a struct or class, and just create a vector of said classes.

My question still stands though: what is this being used for? It feels very unconventional, and there might be a more programmer-friendly approach that I could suggest if I knew what was going on.

Hazard Pay :: FPS/RTS in SharpDX (gathering dust, retained for... historical purposes)
DeviantArt :: Because right-brain needs love too (also pretty neglected these days)

Advertisement

thank you BCullis, I particularly appreciate the OOD suggestion and think that might actually be the approach i am looking for.

J-GREEN

Greenpanoply

This topic is closed to new replies.

Advertisement