Hi, just have a question regarding classes/inheritance and a variable.
ive been trying to work out the best way to do it, but would like some outside input. ok..here goes:
i have a base class Ship.
classes will inherit from this class.
i also have a class tinyShip (and later medShip and largeShip) that inherits from the base class.
these classes would have an 'int maxCargo' variable which would be the maximum capacity of the ship.
my question/part im having trouble with is what would be the best way to implement a cargo system.
each class will have a different max, and i was thinking of going with an array or vector that would be created taking maxCargo in as its size, but how would i go about coding something like that?
the reason i was thinking in terms of arrays is because i want to be able to pull the name of whats stored in a particular "cell" of the cargo.
hope i havent been too confusing...
I appreciate any tips or suggestions, thanks in advance.