Is it possible to have an array of pointers pointing to instances of different classes?
For instance, I have several different type instances:
All of them are pointers, I want to place all of these pointers into an array - How can this be done - can it be done?
A pointer only holds the memory address of the variable so what type do I have to initialize the array to be in order to hold those addresses. Normally, I would have to declare an array of specific types such as an int array to hold the int pointers and another array to hold the pointers to the instances of my class.
Is it possible to acheive this or is this what Linked Lists are for?