Me and a couple of guys are writing a game. The only thing code-wise stopping us is our lack of a dynamic mutt array. What i mean by this, is an array that has no fixed length and can have elements added and removed from it. It also needs to be able to accept a bunch of different types. Like array[1] could be an int and array[2] could be a char. The reason for such an array would be for the main object array. All the objects in our game would be in the same array, and have the ability to be spawned and deleted during run-time. I looked into vectors, but i cannot get them to work. It wont let me assign an iterator to a variable. I'm also not sure as to if vectors accept multiple types.
My Idea is to make my own array class. Since all data is bytes, couldnt i just make a zero defined byte array and when i need to add to it, save its contents, delete it, and create a new byte array?
I just need a dynamic mutt array, one way or another. Man I miss my javaScript arrays ;-)
My Idea is to make my own array class. Since all data is bytes, couldnt i just make a zero defined byte array and when i need to add to it, save its contents, delete it, and create a new byte array?
I just need a dynamic mutt array, one way or another. Man I miss my javaScript arrays ;-)