📄 genqueue.h
字号:
//********************** genQueue.h *************************// generic queue implemented with doubly linked list #ifndef DLL_QUEUE#define DLL_QUEUE#include <list>template<class T>class Queue {public: Queue() { } void clear() { lst.clear(); } bool isEmpty() const { return lst.empty(); } T& front() { return lst.front(); } T dequeue() { T el = lst.front(); lst.pop_front(); return el; } void enqueue(const T& el) { lst.push_back(el); }private: list<T> lst;};#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -