记录详情

Compile Error

foo.c:6:9: error: unknown type name 'QueueNode'
    6 |         QueueNode* next;
      |         ^~~~~~~~~
foo.c:7:9: error: expected specifier-qualifier-list before 'QueueNode'
    7 |         QueueNode(int data)
      |         ^~~~~~~~~
foo.c:14:1: error: unknown type name 'class'
   14 | class Queue{
      | ^~~~~
foo.c:14:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
   14 | class Queue{
      |            ^
foo.c:41:12: error: unknown type name 'Queue'
   41 | void Merge(Queue *q1,Queue *q2)
      |            ^~~~~
foo.c:41:22: error: unknown type name 'Queue'
   41 | void Merge(Queue *q1,Queue *q2)
      |                      ^~~~~
foo.c: In function 'main':
foo.c:76:5: error: unknown type name 'Queue'
   76 |     Queue* q1=new Queue(),*q2=new Queue(),*q3=new Queue();
      |     ^~~~~
foo.c:76:15: error: 'new' undeclared (first use in this function)
   76 |     Queue* q1=new Queue(),*q2=new Queue(),*q3=new Queue();
      |               ^~~
foo.c:76:15: note: each undeclared identifier is reported only once for each function it appears in
foo.c:76:19: error: expected ',' or ';' before 'Queue'
   76 |     Queue* q1=new Queue(),*q2=new Queue(),*q3=new Queue();
      |                   ^~~~~
foo.c:77:7: error: request for member 'InitQueue' in something not a structure or union
   77 |     q1->InitQueue(x);
      |       ^~
foo.c:81:11: error: request for member 'InsertQueue' in something not a structure or union
   81 |         q1->InsertQueue(x);
      |           ^~
foo.c:84:5: error: 'q2' undeclared (first use in this function); did you mean 'q1'?
   84 |     q2->InitQueue(x);
      |     ^~
      |     q1
foo.c:91:5: error: 'q3' undeclared (first use in this function); did you mean 'q1'?
   91 |     q3->InitQueue(x);
      |     ^~
      |     q1
foo.c:97:5: warning: implicit declaration of function 'Merge' [-Wimplicit-function-declaration]
   97 |     Merge(q1,q2);
      |     ^~~~~
[Hydro](https://hydro.ac)提供评测服务

信息

递交者
类型
递交
题目
P3008 A10-1 有序数组的合并
语言
C
递交时间
2023-11-25 23:52:34
评测时间
2023-11-25 23:52:34
评测机
分数
0
总耗时
0ms
峰值内存
0 Bytes