I know this will sounds n00bish, but i'm pretty sure I've written it right but i get a build error of my constructor trying to return a value
.\src\Game.cpp(13) : error C2533: 'CGame::{ctor}' : constructors not allowed a return type
and heres the code:
Header
class CGame {
public:
CGame( HWND p_hWnd, int p_iWidth, int p_iHeight );
~CGame();
// Renders the world
void RenderScene();
private:
// Initalizes D3D
bool InitializeDirect3D(HWND hwnd);
// Shutsdown and cleans up D3D
void ShutdownDirect3D();
CPP
CGame::CGame( HWND p_hWnd, int p_iWidth, int p_iHeight ) {
m_D3DDevice = NULL;
m_D3DObject = NULL;
m_iHeight = p_iHeight;
m_iWidth = p_iWidth;
InitializeDirect3D( p_hWnd );
}
CGame::~CGame() {
}
if i comment out the constructor and destructor i get build errors in my other functions of not having the same return type as the header. Also im just compiling this class.
Any thoughts?
and thanks in advance.