我正在尝试制作一个代表卡片的类。但我在编译时遇到了这个错误。
错误:预期的 `;' 在“西装”之前。
任何人都可以帮助此代码有什么问题吗?
#include<string>
using namespace std;
class Card {
private:
Card::Suit suit;
Card::CardName cardName;
public:
enum Suit {Clubs, Diamonds, Hearts, Spades, UNKNOWN_SUIT};
enum CardName {Ace, Two, Three, Four, Five, Six, Seven, Eight, Nine, Ten, Jack, Queen, King, UNKNOWN_CARDNAME};
class NotInitalised : public exception{};
Card ();
Card (int card);
Card (Card::Suit s, Card::CardName n);
void setCard(Card::Suit, Card::CardName);
Card::Suit getSuit();
Card::CardName getCardName();
Card::CardName getCardName(int);
int getCardValue();
string toString();
};