wcstack.cpp

来自「开放源码的编译器open watcom 1.6.0版的源代码」· C++ 代码 · 共 19 行

CPP
19
字号
#include <wcstack.h>
#include <iostream.h>

void main() {
    WCStack<int,WCValSList<int> >       stack;

    stack.push( 7 );
    stack.push( 8 );
    stack.push( 9 );
    stack.push( 10 );

    cout << "\nNumber of stack entries: " << stack.entries() << "\n";
    cout << "Top entry = [" << stack.top() << "]\n";
    while( !stack.isEmpty() ) {
        cout << stack.pop() << "\n";
    };
    cout.flush();
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?