STL Vectors of Vectors
I'm having some trouble getting my head around using a vector of vectors. I was wondering if anyone could set me straight with this - it's been ages since i've used vectors... :/
I am not sure that this is the correct way to add new elements into the array
typedef std::list <Cenemy *> listEnemies;
std::vector <listEnemies> m_wavesEnemies;
but i'm more confused about how to read the elements - the following doesn't appear to work and throws up a compiler error:
Cenemy *e = new Cenemy();
// Then added elements
Thanks for the help!
You're not using a vector of vectors -- you're using a vector of lists. Lists don't support [array indexing].
oh - my - god...
sorry - this is the end of a 16 hour coding session and i'm not thinking straight. Thanks!