Hi
i have two classes. CHand1326 and CHand169. In both of them i make use of an object of each other. But somehow this produces following error:
meaning syntax error with CHand169 an that CHand1326 is not declared. I tried a lot of stuff ... reducing or removing consts added default constructor even assingment operator and copyconstructor. But nothing helps. Please help me! I guess I can't see the forest for the trees...Code:1>c: ...\Hand1326.h(23): error C2061: Syntaxfehler: Bezeichner 'CHand169' 1>c: ...\Hand169.h(22): error C2065: 'CHand1326': nichtdeklarierter Bezeichner
Specific hand:
HandcategoryCode:#ifndef CHAND1326_H #define CHAND1326_H #include <stdlib.h> #include <Windows.h> #include "poker_defs.h" #include "Hand169.h" class CHand1326{ public: CHand1326(){}; CHand1326(const char Rank1, const char Rank2, const char Suit1, const char Suit2); bool operator< (CHand1326 rPar) const; bool operator> (CHand1326 rPar) const; bool operator<=(CHand1326 rPar) const; bool operator>=(CHand1326 rPar) const; bool operator==(CHand1326 rPar) const; bool isSuited() const { return mSuit1 == mSuit2;}; bool isPair() const { return mRank1 == mRank2;}; CardMask GetCardMask() const; void To169(CHand169 *ret) const; char mRank1, mRank2, mSuit1, mSuit2; }; #endif // CHAND1326_H
Code:#ifndef __CHAND169_H #define __CHAND169_H #include <stdlib.h> #include <Windows.h> #include <set> using std::set; #include "Hand1326.h" class CHand169{ public: CHand169(){}; CHand169(const char Rank1, const char Rank2, const bool isSuited); const bool operator< (CHand169 rPar) const; const bool operator> (CHand169 rPar) const; const bool operator<= (CHand169 rPar) const; const bool operator>= (CHand169 rPar) const; const bool operator== (CHand169 rPar) const; const bool isPair ()const {return mRank1 == mRank2;} const int ToCHand1326 (set<CHand1326 >& rHands1326) const; char mRank1, mRank2; bool isSuited; }; #endif // __CHAND169_H




Reply With Quote