出现error C2106: '=' : left operand must be l-value的原因
程序代码:
#include<stdio.h> int day_of_year(int (*day_tab)[13],int year,int month,int day) { int i; int leap; leap=(year%4==0&&year%100||year%400=0);//此句错误...... for(i=0;i<month;i++) day+=day_tab[leap][13]; return(day); } void main() { int day_tab[][13]={{0,31,28,31,30,31,30,31,31,30,31,30,31}, {0,31,29,31,30,31,30,31,31,30,31,30,31}}; printf("%d",day_of_year(day_tab,1999,9,9)); }运行时出现如题的问题,在网上找到相关的说法就是不能将一个常量赋给另一个常量,可是我等式左边的leap是我定义的整形变量啊,这是怎么回事啊,求助大家啊~