大佬帮忙看看哪里错了
#include<stdio.h>#include<stdlib.h>
main()
{
static char *name [] = {"Illegal day",
"Monday",
"Tuesday",
"Wednesday",
"Friday",
"Saturday",
"Sunday" };
int i ;
char *ps ;
char *day_name(char *name [] ,int n);
printf("input Day No:\n");
scanf("%d",&i);
if(i<0)exit(i);
printf("Day No:%2d-->%s\n",i,ps);
}
char *day_name (char *name [] ,int n)
{
char *pp1,*pp2;
pp1=*name;
pp2=*(name+n);
return((n<1||n>7)? pp1:pp2 );
}
错误提示是 warning C4700: local variable 'ps' used without having been initialized 有没有大佬帮忙看看 好像是说你ps没有初始化 warning 是警告
ps没有初始化
页:
[1]