#include<stdio.h>
#include<string.h>
struct Book
{
char name[20];
short price;
};
int main()
{
struct Book b1 = {"c语言程序设计", 55 };
strcyp(b1.name, "c++");
printf("%s\n", b1.name);
return 0;
}
strcpy你打错了 p和y顺序反了,所以会报错,多注意细节就好了