记录详情

Compile Error

/in/foo.cc:34:2: error: expected '}' at end of input
   34 | }
      |  ^
/in/foo.cc:5:1: note: to match this '{'
    5 | {
      | ^
/in/foo.cc: In constructor 'Time::Time(int, int, int)':
/in/foo.cc:10:21: error: 'hour' was not declared in this scope
   10 |                 h = hour;
      |                     ^~~~
/in/foo.cc: In member function 'void Time::out()':
/in/foo.cc:16:15: error: no matching function for call to 'Time::Time()'
   16 |         ~Time(){
      |               ^
/in/foo.cc:9:9: note: candidate: 'Time::Time(int, int, int)'
    9 |         Time(int time,int minute,int second){
      |         ^~~~
/in/foo.cc:9:9: note:   candidate expects 3 arguments, 0 provided
/in/foo.cc:4:7: note: candidate: 'constexpr Time::Time(const Time&)'
    4 | class Time
      |       ^~~~
/in/foo.cc:4:7: note:   candidate expects 1 argument, 0 provided
/in/foo.cc:4:7: note: candidate: 'constexpr Time::Time(Time&&)'
/in/foo.cc:4:7: note:   candidate expects 1 argument, 0 provided
/in/foo.cc: At global scope:
/in/foo.cc:34:2: error: expected unqualified-id at end of input
   34 | }
      |  ^

信息

递交者
类型
递交
题目
P1416 1 时间类(生死过程)
比赛
2024级《面向对象的方法与实践》基本功测试
语言
C++
递交时间
2025-05-29 11:35:49
评测时间
2025-05-29 11:35:49
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes