C语言局部定义函数错误

D:\Microsoft Visual Studio\Common\MSDev98\Bin\01.cpp(237) : error C2601: 'work5_1' : local function definitions are illegal

int work5_1 (int weekday,int totality)
{
int daycount;

for(int blank=1;blank <= weekday;blank++)
    printf("     ");
for(daycount=1;daycount <= totality;daycount++)
{
    if(weekday > 6)
    {
        printf("  %d  \n");
        weekday = 0;
    }
    else
    {
        printf("  %d  ",daycount);
        weekday++;
    }
}

return weekday;

}

blank 这种方式定义,只有C++才可以,C即便允许了(忘了有没有允许),很多编译器也还没有实现

这看起来是没定义,你在头文件里加上
int work5_1 (int weekday,int totality);
即可