记录详情

Compile Error

/in/foo.cc:12:7: error: expected class-name before '(' token
  ~time(){}
       ^
/in/foo.cc:14:1: error: expected ';' after class definition
 }
 ^
/in/foo.cc: In constructor 'Time::Time(int, int, int)':
/in/foo.cc:11:44: error: 'h' was not declared in this scope
  Time(int hour,int minute,int second):hour(h),minute(m),second(s){}
                                            ^
/in/foo.cc:11:54: error: 'm' was not declared in this scope
  Time(int hour,int minute,int second):hour(h),minute(m),second(s){}
                                                      ^
/in/foo.cc:11:64: error: 's' was not declared in this scope
  Time(int hour,int minute,int second):hour(h),minute(m),second(s){}
                                                                ^
/in/foo.cc: In member function 'int Time::Adds()':
/in/foo.cc:18:1: warning: no return statement in function returning non-void [-Wreturn-type]
 }
 ^

信息

递交者
类型
递交
题目
P1001 OO1-2 时间类Time
比赛
《面向对象的程序设计方法》的课程测验
语言
C++
递交时间
2021-06-22 11:59:10
评测时间
2021-06-22 11:59:10
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes