Hi im kinda new to c++ and dont know mutch aboute unsolved externals
this is what i get:
pices.obj : error LNK2019: unresolved external symbol "private: int __thiscall Pices::MovePawn(int,int,int,int,struct Piece (* const)[12])" (?MovePawn@Pices@@AAEHHHHHQAY0M@UPiece@@@Z) referenced in function "public: int __thiscall Pices::MovePlayer(int,int,int,int,struct Piece (* const)[12])" (?MovePlayer@Pices@@QAEHHHHHQAY0M@UPiece@@@Z)
pices.obj : error LNK2019: unresolved external symbol "private: int __thiscall Pices::MoveKing(int,int,int,int,struct Piece (* const)[12])" (?MoveKing@Pices@@AAEHHHHHQAY0M@UPiece@@@Z) referenced in function "public: int __thiscall Pices::MovePlayer(int,int,int,int,struct Piece (* const)[12])" (?MovePlayer@Pices@@QAEHHHHHQAY0M@UPiece@@@Z)
pices.obj : error LNK2019: unresolved external symbol "private: int __thiscall Pices::MoveBishop(int,int,int,int,struct Piece (* const)[12])" (?MoveBishop@Pices@@AAEHHHHHQAY0M@UPiece@@@Z) referenced in function "public: int __thiscall Pices::MovePlayer(int,int,int,int,struct Piece (* const)[12])" (?MovePlayer@Pices@@QAEHHHHHQAY0M@UPiece@@@Z)
pices.obj : error LNK2019: unresolved external symbol "private: int __thiscall Pices::MoveKnite(int,int,int,int,struct Piece (* const)[12])" (?MoveKnite@Pices@@AAEHHHHHQAY0M@UPiece@@@Z) referenced in function "public: int __thiscall Pices::MovePlayer(int,int,int,int,struct Piece (* const)[12])" (?MovePlayer@Pices@@QAEHHHHHQAY0M@UPiece@@@Z)
pices.obj : error LNK2019: unresolved external symbol "private: int __thiscall Pices::MoveRook(int,int,int,int,struct Piece (* const)[12])" (?MoveRook@Pices@@AAEHHHHHQAY0M@UPiece@@@Z) referenced in function "public: int __thiscall Pices::MovePlayer(int,int,int,int,struct Piece (* const)[12])" (?MovePlayer@Pices@@QAEHHHHHQAY0M@UPiece@@@Z)
C:\Documents and Settings\Alexander\Mina dokument\Visual Studio 2010
this is the pice header
struct Piece
{
char colorPiece; // color = B(lack) or W(hite)
char typePiece; //Type = The type of Pices
int health;
};
class Pices
{
public:
int MovePlayer(int pieceX, int pieceY, int destinationX, int destinationY, struct Piece Chessboard[12][12]);
private:
int MoveRook(int pieceX, int pieceY, int destinationX, int destinationY, struct Piece Chessboard[12][12]);
int MoveBishop(int pieceX, int pieceY, int destinationX, int destinationY, struct Piece Chessboard[12][12]);
int MovePawn(int pieceX, int pieceY, int destinationX, int destinationY, struct Piece Chessboard[12][12]);
int MoveKing(int pieceX, int pieceY, int destinationX, int destinationY, struct Piece Chessboard[12][12]);
int MoveKnite(int pieceX, int pieceY, int destinationX, int destinationY, struct Piece Chessboard[12][12]);
};
#endif // Picess_h__
this is how i call movePlayer
Pices.MovePlayer( x, y, destinationX, destinationY, Chessboard)
witch calls the other functions in this way
MoveRook(pieceX,pieceY,destinationX,destinationY,Chessboard)