记录详情

Compile Error

/in/foo.cc:59:2: error: expected '}' at end of input
   59 | }
      |  ^
/in/foo.cc:3:11: note: to match this '{'
    3 | class Time{
      |           ^
/in/foo.cc: In member function 'int Time::main(int, char**)':
/in/foo.cc:24:1: error: a function-definition is not allowed here before '{' token
   24 | {
      | ^
/in/foo.cc:29:23: error: a function-definition is not allowed here before '{' token
   29 | void addDays(int num) {
      |                       ^
/in/foo.cc:48:9: warning: empty parentheses were disambiguated as a function declaration [-Wvexing-parse]
   48 | int main(){
      |         ^~
/in/foo.cc:48:9: note: remove parentheses to default-initialize a variable
   48 | int main(){
      |         ^~
      |         --
/in/foo.cc:48:9: note: or replace parentheses with braces to value-initialize a variable
/in/foo.cc:48:11: error: a function-definition is not allowed here before '{' token
   48 | int main(){
      |           ^
/in/foo.cc:59:2: error: expected '}' at end of input
   59 | }
      |  ^
/in/foo.cc:16:1: note: to match this '{'
   16 | {
      | ^
/in/foo.cc: At global scope:
/in/foo.cc:59:2: error: expected unqualified-id at end of input
   59 | }
      |  ^

信息

递交者
类型
自测
语言
C++
递交时间
2025-03-14 22:25:28
评测时间
2025-03-14 22:25:28
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes