C++ error expression cannot be used as function

前端 未结 2 1713
野性不改
野性不改 2021-01-29 16:43

How can I edit my formula for

weekday=(day+2(month)+3(month)/5+year+year/4-year/100+year/400)/7

so that I dont get an error message saying \"e

2条回答
  •  情话喂你
    2021-01-29 16:58

    The code 2(month) is function call syntax, as if 2 were a function... but it's not. Do you perhaps mean multiplication, such as 2 * month?

提交回复
热议问题