Hello, I'm sorry if this is in the wrong subforum :S
So I'm trying to create a simple function called Draw for my Player class, however I keep running into the error "Declaration is incompatible"
Here is my header file:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#pragma once
namespace Tmpl8{
class Player
{
public:
Player();
~Player();
void Draw(int x, int y, Surface* m_Screen);
int x;
int oldx;
int y;
};
};
And here is the function in the .cpp file
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include "player.h"
#include "surface.h"
#include "template.h"
usingnamespace Tmpl8;
Player::Player()
{
//took this out for posting
}
void Player::Draw(int x, int y, Surface* m_Screen){
}
The error is occurring on the "Draw" part of the statement.
Any help would be most appreciated, let me know if you need additional information.