foo.c:7:9: error: unknown type name 'QueueNode'
7 | QueueNode* next;
| ^~~~~~~~~
foo.c:8:9: error: expected specifier-qualifier-list before 'QueueNode'
8 | QueueNode(int data,int Index)
| ^~~~~~~~~
foo.c:16:1: error: unknown type name 'class'
16 | class Queue{
| ^~~~~
foo.c:16:12: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
16 | class Queue{
| ^
foo.c: In function 'main':
foo.c:47:5: error: unknown type name 'Queue'
47 | Queue* q=new Queue();
| ^~~~~
foo.c:47:14: error: 'new' undeclared (first use in this function)
47 | Queue* q=new Queue();
| ^~~
foo.c:47:14: note: each undeclared identifier is reported only once for each function it appears in
foo.c:47:18: error: expected ',' or ';' before 'Queue'
47 | Queue* q=new Queue();
| ^~~~~
foo.c:48:6: error: request for member 'InitQueue' in something not a structure or union
48 | q->InitQueue(x);
| ^~
foo.c:52:10: error: request for member 'InsertQueue' in something not a structure or union
52 | q->InsertQueue(x);
| ^~
foo.c:55:20: error: request for member 'Search' in something not a structure or union
55 | int index=q->Search(x);
| ^~
正在同步测试数据,请稍后
[Hydro](https://hydro.ac)提供评测服务