下面程序错误的原因是什么呀
error C2447: missing function header (old-style formal list?)#include<stdio.h>
{
char month_name(int n)
{
static char *name[]={
"January",
"February",
"March",
"April",
"May",
"June",
"July",
"August",
"September",
"October",
"November",
"December"
};
return((n<1||n>12)?name[0]:name[n]);
}
void main()
{
int i;
for(i=0; i<13; i++)
printf("%s\n", month_name(i));
}
}
error C2447: missing function header (old-style formal list?)