求助:关于指针函数
#include <iostream.h>
char *weekname(int n)
{
static char *name[]={"sunday","monday","tuesday","wednesday","thursday","friday","satuesday"};
return (n<1||n>7? name(0):name(n));
}
void main()
{
int i;
for(i=0;i<8;i++)
cout<<weekname(i)<<endl;
}
错误:error C2064: term does not evaluate to a function
Error executing cl.exe.
刚学还请各位指教阿,该怎么改阿?