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即便允許了(忘了有沒有允許),很多編譯器也還沒有實現