0

In c++ How do you create an Array out of declared pointers.

So basically I'm free styling an algorithm for a card game, but came across a problem when trying to create an array out of my cards. I derived creatures from a Wind class and then used pointers to set each class obj a public attack and life int value. Now i need to know how to take the pointers(c1-c13) and add them to an array so I can randomly draw them. Any ideas folks? Yes, I am a rookie, but i learn fast cause i just started coding and can do a lot as is. The main problem is i don't know how the array should look. It would be made of pointers to classes. Is that a thing?

16th May 2017, 12:31 PM
William
William - avatar
2 Answers
0
Thank you for the time and consideration. I'm going to try to break it down here in a few. If someone wouldn't mind adding a sample code as well i'd love to have something to look at with though I'm sure I can figure it out with what James has provided.
16th May 2017, 12:40 PM
William
William - avatar