![]() |
|
#1
|
|||
|
|||
Card class helpHello,
I've just begun working on a side project of mine, and I can't get much farther. I'm working on creating a card class (which is complete), and a working deck class to match which uses the card class. However, the problem seems to be with the enumerated types I have for the suit and rank of the card. It appears as if the Deck class can't recognize the enumerated types embedded in the Card class. Here's the header file for my Card class. CPP / C++ / C Code:
Now, like I said, the error seems to be with the enumerated types. Here's the following code for the beginning of my deck.cpp class. CPP / C++ / C Code:
I get an error message saying basically saying that all my enumerated types are undeclared. I never really learned exactly how enumerated types worked in C++, so I keep on emphasizing that this is the problem. Oh, in addition, the deck class is inherited from a vector of cards, and I'm writing my deck class to be able to handle multiple decks shuffled together. Any help or insight into this problem would be nice. Thanks, Matt |
|
#2
|
|||
|
|||
Re: Card class helphave you tried referring to the enumerated type as Card::TWO, Card::THREE, etc?
|
|
#3
|
|||
|
|||
Re: Card class helpHa,
Actually, I managed to do just that a couple of hours ago. Funny how that works. Should've left a post mentioning I figured the problem. Now my problem is pointers. It's been years since I've done that. Bogging through, about got it though. Yippee. A day of programming and I about got my project done. Whoo.. Thanks again for posting, Matt |
Recent GIDBlog
First week of IA training by crystalattice
| Thread Tools | Search this Thread |
| Rate This Thread | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| a tester class and then some. | postage | Java Forum | 1 | 06-May-2006 15:48 |
| Opinion on my code and a c++ class question | FlipNode | CPP / C++ Forum | 7 | 07-Feb-2006 08:15 |
| Need Help with my Cards Program (C++) | krisopotamus | CPP / C++ Forum | 2 | 06-Oct-2005 16:48 |
| Error C2146: syntax error : missing ',' before identifier 'C4' | mattchew008 | CPP / C++ Forum | 2 | 19-Dec-2004 06:06 |
| can't solve the sum | ryz | CPP / C++ Forum | 0 | 30-Oct-2003 18:55 |
Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The