So I essentially have the following code. I had working code and wanted to separate some of it into two different classes, D3DWindow
and D3DController
, rather than having it all in D3DWindow
. I don't believe it is a pch problem because it was working prior to the separation. The problem occurs in D3DController.cpp
. It says something along the lines of D3DController::Create(D3DWindow*) does not match type D3DController::Create(<error-type>*)
All of the files are in VS2010 and they are all contained in the same project. Nothing stood out immediately as the issue to me.
stdafx.h
#include <d3d10.h>
#include <windows.h>
#include "D3DWindow.h"
#include "D3DController.h"
stdafx.cpp
#include "stdafx.h"
D3DWindow.h
#include "D3DController.h"
class D3DWindow{
D3DController controller;
public bool init();
};
D3DWindow.cpp
#include "stdafx.h"
bool D3DWindow::init(){
if(!controller.create(this))
return false;
return true;
}
D3DController.h
#include "D3DWindow.h"
class D3DController{
public bool Create(D3DWindow* window);
};
D3DController.cpp
#include "stdafx.h"
bool D3DController::Create(D3DWindow* window){
// Do Stuff
return true;
}