Jump to content
  • Advertisement

Archived

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

zip7000

newbie problem

This topic is 5626 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

hi, I have a problem of compilation. here is the error message: g:\programmation\bouquin\justtriangle\form.h(17) : error C2146: syntax error : missing '';'' before identifier ''RestoreDeviceObjects'' I learn directx 9. I created an application using directx9 wizard and now I would like to create a class called CForm. This class has several functions. for instance : HRESULT RestoreDeviceObjects (); but HRESULT seems to be a problem. What should I include as header in CForm? thank you for your help!

Share this post


Link to post
Share on other sites
Advertisement
"g:\programmation\bouquin\justtriangle\form.h(17) : error C2146: syntax error : missing '';'' before
identifier ''RestoreDeviceObjects''"

It means the line befor Restore device objects is missing the ";"

And you have a space between "RestoreDeviceObjects" and "()" so the compiler thinks RestoreDeviceObjects is a variable instead of a function call.

Share this post


Link to post
Share on other sites
quote:
And you have a space between "RestoreDeviceObjects" and "()" so the compiler thinks RestoreDeviceObjects is a variable instead of a function call.


C++ doesn''t care about spacing, so this is quite legal.

It does look like somehow HRESULT is undefined. It''s a pretty integral COM typedef, so it should be defined by pretty much any header that uses COM. If you''re unsure, it''s in at least.

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!