记录详情

Compile Error

/in/foo.cc:28:2: error: expected '}' at end of input
   28 | }
      |  ^
/in/foo.cc:4:11: note: to match this '{'
    4 | class Time{
      |           ^
/in/foo.cc: In constructor 'Time::Time(int, int, int)':
/in/foo.cc:9:61: error: expected ';' before '}' token
    9 |         {cout<<"Time:"<<hour<<":"<<minute<<":"<<second<<endl}
      |                                                             ^
/in/foo.cc: In destructor 'Time::~Time()':
/in/foo.cc:11:61: error: expected ';' before '}' token
   11 |         {cout<<"~Time"<<hour<<":"<<minute<<":"<<second<<endl}
      |                                                             ^
/in/foo.cc: In member function 'void Time::print() const':
/in/foo.cc:13:52: error: expected ';' before '}' token
   13 |         {cout<<hour<<":"<<minute<<":"<<second<<endl}
      |                                                    ^
/in/foo.cc: In member function 'int Time::main()':
/in/foo.cc:19:20: error: 'm2' was not declared in this scope; did you mean 'm1'?
   19 |         Time t1(h1,m2,s1);
      |                    ^~
      |                    m1
/in/foo.cc: At global scope:
/in/foo.cc:28:2: error: expected unqualified-id at end of input
   28 | }
      |  ^

信息

递交者
类型
自测
题目
P1416 1 时间类(生死过程)
语言
C++
递交时间
2025-05-29 11:07:11
评测时间
2025-05-29 11:07:11
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes