KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Lets say I have an abstract class Cat that has a few concrete subclasses Wildcat, Housecat, etc. I want my array to be able to store pointers to a type of cat without knowing which kind it really is. When I try to dynamically allocate an array of Cat, it doesn't seem to be working. Cat* catArray = new Cat[200];
Tags (comma-separated)
Save Edits
Cancel