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++];}
| ^
|