F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_39670561_20703.cpp:11:9: error: 'maxsize' was not declared in this scope
   11 |     T A[maxsize]; // 使用模板类型 T
      |         ^~~~~~~
0_0_39670561_20703.cpp: In member function 'bool Stack<T>::full()':
0_0_39670561_20703.cpp:5:32: error: 'maxsize' was not declared in this scope
    5 |     bool full() {return top == maxsize - 1;} // 修正条件
      |                                ^~~~~~~
0_0_39670561_20703.cpp: In member function 'void Stack<T>::push(T)':
0_0_39670561_20703.cpp:6:22: error: 'A' was not declared in this scope
    6 |     void push(T k) { A[++top] = k;}
      |                      ^
0_0_39670561_20703.cpp: In member function 'T Stack<T>::pop()':
0_0_39670561_20703.cpp:7:22: error: 'A' was not declared in this scope
    7 |     T pop() { return A[top--];}
      |                      ^
0_0_39670561_20703.cpp: At global scope:
0_0_39670561_20703.cpp:25:9: error: 'maxsize' was not declared in this scope
   25 |     M B[maxsize]; // 使用模板类型 M
      |         ^~~~~~~
0_0_39670561_20703.cpp: In member function 'bool Quene<M>::full()':
0_0_39670561_20703.cpp:18:33: error: 'maxsize' was not declared in this scope
   18 |     bool full() {return rear == maxsize;}
      |                                 ^~~~~~~
0_0_39670561_20703.cpp: In member function 'void Quene<M>::enQuene(M)':
0_0_39670561_20703.cpp:19:25: error: 'B' was not declared in this scope
   19 |     void enQuene(M k) { B[rear++] = k;}
      |                         ^
0_0_39670561_20703.cpp: In member function 'M Quene<M>::deQuene()':
0_0_39670561_20703.cpp:20:26: error: 'B' was not declared in this scope
   20 |     M deQuene() { return B[front++];}
      |                          ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-28 14:04:22, Gzip enabled