CDirect3D constructor error, help!

Started by
1 comment, last by renqilin 21 years, 4 months ago
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?
Advertisement
'';'' after declaration of class?
oh, in my program there is a ; after class declaration, and the error is :"compiler doesn''t allow a return type"
could somebody tell me what''s wrong?

This topic is closed to new replies.

Advertisement