C++LinkDeQueue

Posted masteryan576356467

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了C++LinkDeQueue相关的知识,希望对你有一定的参考价值。

#pragma once
#ifndef _LINKDEQUEUE_H_
#define _LINKDEQUEUE_H_

#include "linklist.h"

template<typename T, typename _Container = linklist<T>>
class linkdequeue
protected:
using uint = unsigned int;
_Container c;
public:

linkdequeue() :c()
explicit linkdequeue(const _Container &c) :c(c)
bool empty()const return c.empty();
uint size()const return c.size();
const _Container &getContainer() const return c;
void push_back(const T &value) c.push_back(value);
void pop_back() c.pop_back();
void push_front(const T &value) c.push_front(value);
void pop_front() c.pop_front();
void clear() c.clear();
const T &front()const return c.front();
const T &back()const return c.back();
T &front() return c.front();
T &back() return c.back();

;

 


#endif // !_LINKQUEUE_H_

 

以上是关于C++LinkDeQueue的主要内容,如果未能解决你的问题,请参考以下文章

C/C++ floor 函数

C语言数组问题?

关于c++/c

C语言 extern “C”

使用 MetroWerks C/C++ 开发的 C/C++ 资源

Lua与C/C++交互——C/C++调用Lua脚本