left operand must be l-value什么意思# include # define M 10typedef struct{ char num[10];int s;} SCORE;int fun(SCORE *a,SCORE *b){int i,j=0;b[0].s=a[0].s;for(i=1;i

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/26 12:20:17
left operand must be l-value什么意思# include # define M 10typedef struct{ char num[10];int s;} SCORE;int fun(SCORE *a,SCORE *b){int i,j=0;b[0].s=a[0].s;for(i=1;i
xRMoA+pfx4&z$vavMbVji ~E lRgf'Lxigyf&'rJۺ 2 Pʙ ,8ym[Pt( 2JVpD#Ǝ6 @JF#)Q P޻ͺYnHe!o[r2 [v>ƣW~/kAE]4+ފñv=!bDyt;uvL5mG~LдA.%έőuvnCE~T_FCS}t 9.G8? wQv6P *r 1p!#~MrT94XXC߳bmWIiFpV'Wz+qUW\HIiR-'ȰDJ;Lx\Q o T.z;/; ,?OzZ|H(.蒖X߫/

left operand must be l-value什么意思# include # define M 10typedef struct{ char num[10];int s;} SCORE;int fun(SCORE *a,SCORE *b){int i,j=0;b[0].s=a[0].s;for(i=1;i
left operand must be l-value什么意思
# include
# define M 10
typedef struct
{
char num[10];
int s;
} SCORE;
int fun(SCORE *a,SCORE *b)
{
int i,j=0;
b[0].s=a[0].s;
for(i=1;i

left operand must be l-value什么意思# include # define M 10typedef struct{ char num[10];int s;} SCORE;int fun(SCORE *a,SCORE *b){int i,j=0;b[0].s=a[0].s;for(i=1;i
left operand must be l-value是说:运算符的左边应该是一个“左值”.所谓“左值”就是指在程序中占用内存空间、可以被修改的量,比如各种变量.
你这条语句中的b[j].num是一个字符数组,而数组是不能整体赋值的.
如果你想把a[i].num赋给b[j].num,应该调用strcpy函数:strcpy(b[j].num,a[i].num);然后加入头文件#include .
strcpy是一个字符串操作函数.