Hello,
I have a class:
When I try to access typical vector methods...
I get an error: [tt]error C2247: 'std::vector<_Ty>:ush_back' not accessible because 'Deck' uses 'private' to inherit from 'std::vector<_Ty>'[/tt]
I am creating the class because I want to be able to add additional operations on the vector, but obviously still want to access the native methods. What do I need to do?
Any suggestions appreciated.
Thanks.
I have a class:
Code:
class Deck : vector<Card*>
When I try to access typical vector methods...
Code:
Card * c = new Card(...);
Deck myDeck;
myDeck.push_back(c);
I get an error: [tt]error C2247: 'std::vector<_Ty>:ush_back' not accessible because 'Deck' uses 'private' to inherit from 'std::vector<_Ty>'[/tt]
I am creating the class because I want to be able to add additional operations on the vector, but obviously still want to access the native methods. What do I need to do?
Any suggestions appreciated.
Thanks.