记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:219:2: error: 'cinh1' was not declared in this scope
  219 |  cinh1>>m1>>s1;
      |  ^~~~~
foo.cc:222:2: error: 'cinh2' was not declared in this scope
  222 |  cinh2>>m2>>s2;
      |  ^~~~~
foo.cc:223:11: error: no matching function for call to 'DateTime::DateTime()'
  223 |  DateTime tar2,h2,m2,s2);
      |           ^~~~
foo.cc:181:3: note: candidate: 'DateTime::DateTime(int, int, int)'
  181 |   DateTime(int h,int m,int s):B(h,m,s){}
      |   ^~~~~~~~
foo.cc:181:3: note:   candidate expects 3 arguments, 0 provided
foo.cc:175:7: note: candidate: 'DateTime::DateTime(DateTime&)'
  175 | class DateTime
      |       ^~~~~~~~
foo.cc:175:7: note:   candidate expects 1 argument, 0 provided
foo.cc:223:16: error: conflicting declaration 'DateTime h2'
  223 |  DateTime tar2,h2,m2,s2);
      |                ^~
foo.cc:221:8: note: previous declaration as 'int h2'
  221 |    int h2,m2,s2;
      |        ^~
foo.cc:223:19: error: conflicting declaration 'DateTime m2'
  223 |  DateTime tar2,h2,m2,s2);
      |                   ^~
foo.cc:221:11: note: previous declaration as 'int m2'
  221 |    int h2,m2,s2;
      |           ^~
foo.cc:223:24: error: expected initializer before ')' token
  223 |  DateTime tar2,h2,m2,s2);
      |                        ^
foo.cc:221:8: warning: unused variable 'h2' [-Wunused-variable]
  221 |    int h2,m2,s2;
      |        ^~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P1001 OO1-2 时间类Time
比赛
2022春 面向对象程序设计方法的上机作业
语言
C++
递交时间
2022-05-16 21:46:04
评测时间
2022-05-16 21:46:04
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes