记录详情

Compile Error

/in/foo.cc:1:19: warning: extra tokens at end of #include directive
 #include <fstream>   
                   ^
/in/foo.cc:2:17: warning: extra tokens at end of #include directive
 #include <cmath>   
                 ^
/in/foo.cc:3:20: warning: extra tokens at end of #include directive
 #include <iostream>   
                    ^
/in/foo.cc:4:21: warning: extra tokens at end of #include directive
 #include <algorithm>   
                     ^
/in/foo.cc: In member function 'bool time::operator==(time)':
/in/foo.cc:16:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
   if(h==t2.h&&m==t2.m&&s==t2.s)
   ^~
/in/foo.cc:18:4: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
    return false; 
    ^~~~~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:46:7: error: expected ';' before 't1'
  time t1(h1,m1,s1);  
       ^~
/in/foo.cc:46:19: warning: statement is a reference, not call, to function 'time' [-Waddress]
  time t1(h1,m1,s1);  
                   ^
/in/foo.cc:46:19: warning: statement has no effect [-Wunused-value]
/in/foo.cc:47:7: error: expected ';' before 't2'
  time t2(h2,m2,s2);
       ^~
/in/foo.cc:47:19: warning: statement is a reference, not call, to function 'time' [-Waddress]
  time t2(h2,m2,s2);
                   ^
/in/foo.cc:47:19: warning: statement has no effect [-Wunused-value]
/in/foo.cc:48:10: error: 't1' was not declared in this scope
  while(!(t1==t2))
          ^~
/in/foo.cc:48:14: error: 't2' was not declared in this scope
  while(!(t1==t2))
              ^~

信息

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