Hi...I need some syntax help with my game! I'm still putting together the declaration files, and I'm using a provided ADT header file, such as follows:
Now...how would I go about building the deck to assign a value to each card structure? Because I want an array of data type cards. Of course I can just manipulate the display to show the appropriate value and suite for the card number, but this seemed funner.
const int MAX_LIST = 52;
typedef CSomeClass ListItemType;
// The following structure is what I am asking questions about:
bool isEmpty() const;
int getLength() const;
void insert(int index, ListItemType newItem,
void remove(int index, bool& success);
void retrieve(int index, ListItemType& dataItem,
bool& success) const;
int translate(int index) const;
I don't even have the foggiest clue. With the old-fashioned std linked list one could just typedef the list and say something like
but that doesn't really seem to apply in this case.
for(int x=1; x<=52; x++)
cur->value = x;
Thanks in advance for any suggestions!