------------------
----------------------
Kim Forsberg
WorldScape Productions
----------------------
🔒 Locked
Dynamic class pointer arrays?
Advertisement
Original Post
Simple question, hard answer... I just need help with how to initialize and use them in my game.
class llave {
public:
char stuff;
public:
char stuff;
private:
int stuff2;
};
llave *ptr;
void main() {
ptr = new llave[number_here];
ptr[x].stuff = 'C';
}
------------------
E-mail with questions, comments, and retorts.
Thanks for the answer but unfortunatley
i already know how to do that. What i need to know is how to create an dynamic pointer array that can grow and shrink in size in runtime.
i already know how to do that. What i need to know is how to create an dynamic pointer array that can grow and shrink in size in runtime.
Whitehouse:
How about using a linked list with whatever data members you need. To use it like an array, overload the [] operator.
Six
Do you perhaps know where I might find a tutorial on the subject of linked lists?
Try searching for it on yahoo or another search engine. It is a basic concept, so you should be able to find plenty of information.
Topic Locked
This topic has been locked by a moderator. New replies are not allowed.
Sign in to reply to this topic.
Advertisement