记录详情

Compile Error

/in/foo.cc: In function 'int main()':
/in/foo.cc:22:7: error: expected ';' before 'g1'
  time g1(a[0],a[1],a[2]);
       ^~
/in/foo.cc:22:25: warning: statement is a reference, not call, to function 'time' [-Waddress]
  time g1(a[0],a[1],a[2]);
                         ^
/in/foo.cc:22:25: warning: statement has no effect [-Wunused-value]
/in/foo.cc:24:7: error: expected ';' before 'g2'
  time g2(a[0],a[1],a[2]);
       ^~
/in/foo.cc:24:25: warning: statement is a reference, not call, to function 'time' [-Waddress]
  time g2(a[0],a[1],a[2]);
                         ^
/in/foo.cc:24:25: warning: statement has no effect [-Wunused-value]
/in/foo.cc:25:6: error: 'g1' was not declared in this scope
  ans=g1.minus(g2);
      ^~
/in/foo.cc:25:15: error: 'g2' was not declared in this scope
  ans=g1.minus(g2);
               ^~

信息

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