CDirect3D constructor error, help!
I created a class as follow:
// CDirect3D.h
class CDirect3D
{
public:
CDirect3D(HWND hWnd);
Other codes...
}
// CDirect3D.cpp
CDirect3D::CDirect3D(HWND hWnd)
{
if (hWnd == NULL)
{
m_hWnd = GetActiveWindow();
}
else
{
m_hWnd = hWnd;
}
m_pD3D = NULL;
m_pD3DDevice = NULL;
}
but when i compiling the program, the compiler output an error:Constructor doesn''t allow to return a value.
where is wrong? can somebody help me?
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement