Public Group

# Compile Error C2447 (VC++ 6)

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

## 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 on other sites
Remove the semicolon after the function header:
int COGLWindowManager::OnKeyUp(unsigned int charCode){	return 0;}//EDIT://Old K&R style function:voidsomefuntion(i, j, str)int i;int j;char * str;{//}// same as above, new stylevoid somefunction(int i, int j, char * str){}

HTH,
Pat

##### Share on other sites
Quote:
 Original post by EndarNow 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 on other sites
See edited post above.

##### 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.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 9
• 11
• 9
• 9
• ### Forum Statistics

• Total Topics
633715
• Total Posts
3013494
×