error:assignment to expression with array type
//错误:赋值给具有数组类型的表达式
#include<stdio.h>
#include<string.h>
struct StudentS
{
int num;
char name[8];
double scores;
};
int main()
{
struct StudentS s1;
s1.num = 23;
//s1.name = "Lebron James";//错误写法
strcpy(s1.name,"Lebron James");//正确写法
s1.scores = 2306;
printf("%d\t%s\t%.2lf\n",s1.num,s1.name,s1.scores);
return 0;
}