Reply
Fri 18 Nov, 2005 07:41 pm
When I make this mistake in C programming:
void myF(); //Extra semi colon here
{
printf("hello");
}
I get this error in MSVC:
error C2447: '{' : missing function header (old-style formal list?)
WTF is a old-style formal list ? What did the syntax use to be? I was under the impression C syntax hasn't changed for a quite while. No other syntax errors give you this kind of error message.
a quick google search reveals this post:
Quote:
BTW, that "old-style formal list" is from ancient K&R * syntax in which a function would be declare something like this (cut me some slack, guys, I'm doing this from memory):
double Total_SA(r, h);
double r;
double h;
{
return 2*PI*r*(r+h);
}
You'll never use this old syntax, but there's still a lot of old source code floating around on the Web that use it, so you just might encounter it one day and when you do you'll need to know how to correct it.
[* Footnote: K&R == "Kernighan & Ritchie", the designers of C and authors of "The C Programming Language". The second edition does conform to ANSI C standards.
Full post:
http://forums.devshed.com/archive/t-296162/error-C2447-missing-function-header-oldstyle-formal-list