记录详情

Compile Error

/in/foo.c:2:1: error: unknown type name 'using'
 using namespase std;
 ^~~~~
/in/foo.c:2:17: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'std'
 using namespase std;
                 ^~~
/in/foo.c:3:1: error: unknown type name 'class'
 class Time
 ^~~~~
/in/foo.c:4:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
 {
 ^
/in/foo.c: In function 'main':
/in/foo.c:41:2: error: 'cin' undeclared (first use in this function)
  cin>>h>>m>>s;
  ^~~
/in/foo.c:41:2: note: each undeclared identifier is reported only once for each function it appears in
/in/foo.c:43:3: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'cin'
   cin>>num;
   ^~~
/in/foo.c:43:8: error: 'num' undeclared (first use in this function)
   cin>>num;
        ^~~
/in/foo.c:44:2: error: unknown type name 'Time'
  Time time;
  ^~~~
/in/foo.c:45:6: error: request for member 'init' in something not a structure or union
  time.init(h,m,s);
      ^
/in/foo.c:46:6: error: request for member 'add' in something not a structure or union
  time.add(num);
      ^
/in/foo.c:47:6: error: request for member 'print' in something not a structure or union
  time.print();
      ^
/in/foo.c:44:7: warning: variable 'time' set but not used [-Wunused-but-set-variable]
  Time time;
       ^~~~

信息

递交者
类型
递交
题目
P1000 OO1-1 时间类Time
语言
C
递交时间
2019-08-12 19:20:24
评测时间
2019-08-13 11:53:18
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes