记录详情

Compile Error

/in/foo.cc:10:28: error: unable to find numeric literal operator 'operator""int'
   10 |         Time(int h=0,int m=0.int s=0):hour(h),min(m),second(s)
      |                            ^~~~~
/in/foo.cc:10:28: note: use '-fext-numeric-literals' to enable more built-in suffixes
/in/foo.cc: In constructor 'Time::Time(int, int)':
/in/foo.cc:10:61: error: 's' was not declared in this scope
   10 |         Time(int h=0,int m=0.int s=0):hour(h),min(m),second(s)
      |                                                             ^
/in/foo.cc: In function 'int main()':
/in/foo.cc:28:25: error: no matching function for call to 'Time::Time(int&, int&, int&)'
   28 |         Time t1(a1,b1,c1);
      |                         ^
/in/foo.cc:10:9: note: candidate: 'Time::Time(int, int)'
   10 |         Time(int h=0,int m=0.int s=0):hour(h),min(m),second(s)
      |         ^~~~
/in/foo.cc:10:9: note:   candidate expects 2 arguments, 3 provided
/in/foo.cc:5:7: note: candidate: 'constexpr Time::Time(const Time&)'
    5 | class Time
      |       ^~~~
/in/foo.cc:5:7: note:   candidate expects 1 argument, 3 provided
/in/foo.cc:30:25: error: no matching function for call to 'Time::Time(int&, int&, int&)'
   30 |         Time t2(a2,b2,c2);
      |                         ^
/in/foo.cc:10:9: note: candidate: 'Time::Time(int, int)'
   10 |         Time(int h=0,int m=0.int s=0):hour(h),min(m),second(s)
      |         ^~~~
/in/foo.cc:10:9: note:   candidate expects 2 arguments, 3 provided
/in/foo.cc:5:7: note: candidate: 'constexpr Time::Time(const Time&)'
    5 | class Time
      |       ^~~~
/in/foo.cc:5:7: note:   candidate expects 1 argument, 3 provided

信息

递交者
类型
递交
题目
P1416 1 时间类(生死过程)
语言
C++
递交时间
2025-06-15 13:32:41
评测时间
2025-06-15 13:32:41
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes