I've been out of internet contact for the last week and am returning with a whole slew of questions about arrays. I'll list them all and if you have a way to accomplish any of these, or if there's some documentation that I haven't found yet that I could read and it would answer all my questions, I'd love your help. Here goes:
- How do I add and subtract objects from an array without manually reconstructing an array? (equivalent of pop and push functions in other languages)
- Can you pass arrays as variables in a message (ex: [anObject doSomethingWithArray:array])
- Can you have 2 dimensional arrays, or arrays containing other arrays?
And then another question on an unrelated note:
I want to have a basic class that keeps track of a sprite, that I can instantiate over an over again, which I can keep copies of in an array and use to keep track of all of the sprites moving on my iPod. How should I reference the class file (SpriteInfo.m or SpriteInfo.h) and where should I put it in EAGLView so that I can declare variables of the type SpriteInfo?
- How do I add and subtract objects from an array without manually reconstructing an array? (equivalent of pop and push functions in other languages)
- Can you pass arrays as variables in a message (ex: [anObject doSomethingWithArray:array])
- Can you have 2 dimensional arrays, or arrays containing other arrays?
And then another question on an unrelated note:
I want to have a basic class that keeps track of a sprite, that I can instantiate over an over again, which I can keep copies of in an array and use to keep track of all of the sprites moving on my iPod. How should I reference the class file (SpriteInfo.m or SpriteInfo.h) and where should I put it in EAGLView so that I can declare variables of the type SpriteInfo?