08/09/19 12:02:09
VC2008でマリオもどきを作ろうとしてるんですが、↓のソース(関係無さそうなメソッドとかは省略してます)をコンパイルすると
>v:\projects\mario\player.cpp(8) : error C2511: 'Player::Player(int,int,pleyer_type)' : オーバーロードされたメンバ関数が 'Player' にありません。
> v:\projects\mario\player.h(8) : 'Player' の宣言を確認してください。
となります。どこがおかしいのでしょうか?(見づらい質問でごめんなさい)
//Player.h
#include "Characters.h"
class Player : public Characters{
private:
enum player_type ptype;
public:
Player(void);
Player(int x,int y,enum player_type type);
};
//Player.cpp
#include "Player.h"
Player::Player(void){
this->x = 1;
this->y = 1;
this->ptype = PTYPE_NOM;
}
Player::Player(int x,int y,enum pleyer_type type){
this->x = x;
this->y = y;
this->ptype = type;
}
//Characters.h
class Characters{
enum char_type ctype;
public:
Characters(void);
Characters(int x,int y,enum char_type cp);
};