Jump to content
  • Advertisement
Sign in to follow this  
Idono87

Quick error question

This topic is 2552 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'm learning the win32 api and i keep getting errors at one of my function prototypes where i'm trying to pass a reference variable of type POINT.

here are the the error messages.

error C2143: syntax error : missing ')' before '&'
error C2143: syntax error : missing '{' before '&'
error C2059: syntax error : '&'
error C2059: syntax error : ')'


Prototype
HWND CreateButton(HWND hwnd, wchar_t* name, int identifier, POINT& pt);


The function.
HWND CreateButton(HWND hwnd, wchar_t* name, int identifier, POINT &pt)
{
....
}


I've played around referencing both classes and structs 20 min befor i wrote this post. Just incase i missunderstood something and massivly failed. They worked and compiled perfectly.

Question is what i'm doing wrong.

Share this post


Link to post
Share on other sites
Advertisement
That exact code compiles fine under VS2010

I would suspect a project setting, what IDE are you using?

Share this post


Link to post
Share on other sites

That exact code compiles find under VS2010

I would suspect a project setting, what IDE are you using?


I'm using VS2010 Ultimate.

Share this post


Link to post
Share on other sites

Are you sure you're compiling as C++ and not as C?


Haha. Simple as that.
Never had that problem befor :/

Thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • 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!