vc中,怎么使用队列??那位大虾有相关的例子给我看看!!!!
解决方案 »
- [MFC]我的这段代码问题出在哪里啊,详见描述。
- VC++中的一个问题?
- 用四边形画DEM, 地形图的时候,有100*100个网格, 每个网格上有个高程, 结果用glBegin(GL_QUADS)画的很慢,
- 我在 vs 2005 的工具箱里怎么找不到 status bar
- 如何在一指定区域画一个字,且这个字能刚好填满这个区域
- 如何控制弹出的对话框在整个屏幕内移动,而不能移出窗口之外?
- 聚合到底用来做什么呢??
- 如何读取RTF文件?
- winamp是用什么工具编的,如果来编呀!~
- 在64位机子上,通过ADO方式连接sql server2008数据库
- 请看看这个简单的问题,我一直没搞明白
- 关于UDP的问题?
CObList类不是很好用吗?
template<class T,
class Cont = deque<T> >
class queue {
public:
typedef Cont::allocator_type allocator_type;
typedef Cont::value_type value_type;
typedef Cont::size_type size_type;
explicit queue(const allocator_type& al = allocator_type()) const;
bool empty() const;
size_type size() const;
allocator_type get_allocator() const;
value_type& top();
const value_type& top() const;
void push(const value_type& x);
void pop();
protected:
Cont c;
};
The template class describes an object that controls a varying-length sequence of elements. The object allocates and frees storage for the sequence it controls through a protected object named c, of class Cont. The type T of elements in the controlled sequence must match value_type.An object of class Cont must supply several public members defined the same as for deque and list (both of which are suitable candidates for class Cont). The required members are: typedef T value_type;
typedef T0 size_type;
Cont(const allocator_type& al);
bool empty() const;
size_type size() const;
allocator_type get_allocator() const;
value_type& front();
const value_type& front() const;
value_type& back();
const value_type& back() const;
void push_back(const value_type& x);
void pop_front();
Here, T0 is an unspecified type that meets the stated requirements.