记录详情

Compile Error

/in/foo.cc:3:1: error: ISO C++ forbids declaration of 'leap' with no type [-fpermissive]
    3 | leap(int y)
      | ^~~~
/in/foo.cc: In function 'int leap(int)':
/in/foo.cc:6:36: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
    6 |         leap= y%400==0 || y%100!=0 && y%4==0;
      |                           ~~~~~~~~~^~~~~~~~~
/in/foo.cc: At global scope:
/in/foo.cc:12:1: error: ISO C++ forbids declaration of 'monthday' with no type [-fpermissive]
   12 | monthday(int y,int m)
      | ^~~~~~~~
/in/foo.cc:22:1: error: ISO C++ forbids declaration of 'yearday' with no type [-fpermissive]
   22 | yearday(int y,int m)
      | ^~~~~~~

信息

递交者
类型
递交
题目
A1-4 分支结构练习:今年过去了多少天
比赛
2025程序设计与竞赛作业赛第一场(整装出发)
语言
C++
递交时间
2025-09-27 20:06:38
评测时间
2025-10-03 02:14:39
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes