Jump to content
  • Advertisement
Sign in to follow this  
Endar

Compile Error C2447 (VC++ 6)

This topic is 4776 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 just got the compile time error C2447 with this bit of code:
int COGLWindowManager::OnKeyUp(unsigned int charCode);
{
	return 0;
}

And this is the error message it gave me: "missing function header (old-style formal list?)". Now I know what caused the error, I'm not so tired that I didn't see the semi-colon :D. The point of this post was to ask what the old style C formal list is?

Share this post


Link to post
Share on other sites
Advertisement
Remove the semicolon after the function header:

int COGLWindowManager::OnKeyUp(unsigned int charCode)
{
return 0;
}

//EDIT:
//Old K&R style function:
void
somefuntion(i, j, str)
int i;
int j;
char * str;
{
//
}

// same as above, new style
void somefunction(int i, int j, char * str)
{
}




HTH,
Pat

Share this post


Link to post
Share on other sites
Quote:
Original post by Endar
Now I know what caused the error, I'm not so tired that I didn't see the semi-colon :D.

The point of this post was to ask what the old style C formal list is?

Share this post


Link to post
Share on other sites
An old style C function declaration looks like:

int func(bar, baz)
int bar;
int baz;
{
return bar + baz;
}

The function prototype lists only the names of the arguments, the types of the arguments come after the function declaration.

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!