记录详情

Compile Error

/in/foo.cc:78:1: error: expected '}' at end of input
 }
 ^
/in/foo.cc: In member function 'int Date::isLeapYear(int)':
/in/foo.cc:12:28: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
   if(year%400==0||year%4==0&&year%100!=0)
                   ~~~~~~~~~^~~~~~~~~~~~~
/in/foo.cc: In member function 'void Date::Add(int)':
/in/foo.cc:22:6: warning: suggest explicit braces to avoid ambiguous 'else' [-Wparentheses]
    if(month==1||month==3||month==5||month==7||month==8||month==10||month==12)
      ^
/in/foo.cc:63:2: error: a function-definition is not allowed here before '{' token
  {
  ^
/in/foo.cc:69:1: error: a function-definition is not allowed here before '{' token
 {
 ^
/in/foo.cc:78:1: error: expected '}' at end of input
 }
 ^
/in/foo.cc: At global scope:
/in/foo.cc:78:1: error: expected unqualified-id at end of input

信息

递交者
类型
递交
题目
P1003 OO1-3 日期类Date
语言
C++
递交时间
2019-03-31 14:34:51
评测时间
2019-03-31 14:34:51
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes