记录详情

Compile Error

foo.cc: In function 'int main()':
foo.cc:32:16: error: 'Time::Time(int, int, int)' is private within this context
   32 |  Time t(h, s, m);
      |                ^
foo.cc:6:2: note: declared private here
    6 |  Time(int h,int m,int s){
      |  ^~~~
foo.cc:35:10: error: 'void Time::Add(int)' is private within this context
   35 |  t.Add(ss);
      |          ^
foo.cc:14:7: note: declared private here
   14 |  void Add(int s) {
      |       ^~~
foo.cc:36:11: error: 'void Time::Output()' is private within this context
   36 |  t.Output();
      |           ^
foo.cc:11:7: note: declared private here
   11 |  void Output() {
      |       ^~~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

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