请教一个C语言问题,顺便看看有没有其他问题 strcat cannot convert parameter 1 from 'char' to 'char *'
#include <process.h>#include <string.h>
#include <stdio.h>
void zj();
void find(); //查找某同学的量化分的函数
struct stu
{
char *name;
int number;
float garde;
char reason;
}boy[59][4]={
{"张三",2014070101,0,'\0'},
{"李四",2013070102,0,'\0'},
{"王五",2014070103,0,'\0'},
{"赵六",2014070104,0,'\0'},
};
main()
{
int choose=0;
printf("***** 1.查询量化分 *****\n");
printf("***** 2.添加量化分 *****\n");
scanf("%d",&choose);
if (choose==1)
find();
if (choose==2)
zj();
void zj(); //添加量化分
int i,n; //定义变量
char e='\0';
float a=0.0000;
for (i=0;i<4;i++)
{again:
printf("************************************");
printf(" 姓名: ","%s\n",boy[i][1].name);
printf(" 学号: ","%d\n",boy[i][2].number);
printf(" 量化分: ","%f\n",boy[i][3].garde);
printf(" 加分细则:","%s\n",boy[i][4].reason);
printf("************************************");
printf(" 请输入量化分数,输入0则跳转下一名同学");//输入量化分细则
scanf("%f\n",&a);
if (a==0)
continue; //跳转下一位
printf(" 请输入量化分加分细则"); //选择细则,或输入细则
scanf("%c\n",&e);
printf(" 您输入的量化分数为:\n");
printf("%f\n",a);
printf(" 您输入的量化分加分细则为:\n");
printf("%s\n",e);
printf("是否保存?不保存请输入n,任意键保存");
scanf("%d",&choose);
if (choose==n)//如果不保存,返回again处
goto again;
boy[i][3].garde+=a;
strcat((char)boy[i][4].reason,e);
return(boy[i][3].garde,boy[i][4].reason);}
printf("001");
void find();
again: printf("请输入查询学生的姓名或学号");
scanf("%s\n",&find);
for(i=0;i<4;i++)
if ((char)boy[i][1].name==(char)find|| (char)boy[i][2].number)
{
printf(" 姓名: ","%s\n",boy[i][1].name);
printf(" 学号: ","%d\n",boy[i][2].number);
printf(" 量化分: ","%f\n",boy[i][3].garde);
printf(" 加分细则:","%s\n",boy[i][4].reason);
printf("是否继续查找?不查找请输入n,,其余任意键继续查询,");
scanf("%d",&choose);
if (choose==n) //退出查找
continue;
goto again;
}
}