?? istack.h
字號:
#ifndef ISTACK_H
#define ISTACK_H
#include <vector>
using std::vector;
#include "stckexcp.h"
class iStack {
public:
iStack( int capacity )
: _stack( capacity ), _top( 0 ) { }
void pop( int &top_value ) throw( popOnEmpty );
void push( int value ) throw( pushOnFull );
bool full();
bool empty();
void display();
int size();
private:
int _top;
vector< int > _stack;
};
inline int iStack::size() { return _top; };
inline bool iStack::empty() { return _top ? false : true; }
inline bool iStack::full() { return _top < _stack.size()-1 ? false : true; };
#endif
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -