Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

renqilin

CDirect3D constructor error, help!

This topic is 5734 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
Advertisement
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?

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!