亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? linkedqueue.h

?? C++編成數據結構與程序設計方法 D.S.Malk編著
?? H
字號:
//Header file linkedQueue.h

#ifndef H_linkedQueue
#define H_linkedQueue

#include <iostream>
#include <cassert>
#include "queueADT.h"

using namespace std;

template <class Type>
class linkedQueueType: public queueADT<Type>
{
public:
    const linkedQueueType<Type>& operator=
                    (const linkedQueueType<Type>&); 
      //Overload the assignment operator.

    bool isEmptyQueue() const;
      //Function to determine whether the queue is empty. 
      //Postcondition: Returns true if the queue is empty,
      //               otherwise returns false.

    bool isFullQueue() const;
      //Function to determine whether the queue is full. 
      //Postcondition: Returns true if the queue is full,
      //               otherwise returns false.

    void initializeQueue();
      //Function to initialize the queue to an empty state.
      //Postcondition: queueFront = NULL; queueRear = NULL

    Type front() const;
      //Function to return the first element of the queue.
      //Precondition: The queue exists and is not empty.
      //Postcondition: If the queue is empty, the program 
      //               terminates; otherwise, the first 
      //               element of the queue is returned. 

    Type back() const;
      //Function to return the last element of the queue.
      //Precondition: The queue exists and is not empty.
      //Postcondition: If the queue is empty, the program 
      //               terminates; otherwise, the last 
      //               element of the queue is returned.

    void addQueue(const Type& queueElement);
      //Function to add queueElement to the queue.
      //Precondition: The queue exists and is not full.
      //Postcondition: The queue is changed and queueElement
      //               is added to the queue.

    void deleteQueue();
      //Function  to remove the first element of the queue.
      //Precondition: The queue exists and is not empty.
      //Postcondition: The queue is changed and the first 
      //               element is removed from the queue.

    linkedQueueType(); 
      //Default constructor

    linkedQueueType(const linkedQueueType<Type>& otherQueue); 
      //Copy constructor

    ~linkedQueueType(); 
      //Destructor

private:
    nodeType<Type> *queueFront; //pointer to the front of 
                                //the queue
    nodeType<Type> *queueRear;  //pointer to the rear of 
                                //the queue
};

    //Default constructor
template<class Type>
linkedQueueType<Type>::linkedQueueType() 
{
    queueFront = NULL; //set front to null
    queueRear = NULL;  //set rear to null
} //end default constructor

template<class Type>
bool linkedQueueType<Type>::isEmptyQueue() const
{
    return(queueFront == NULL);
} //end 

template<class Type>
bool linkedQueueType<Type>::isFullQueue() const
{
    return false;
} //end isFullQueue

template <class Type>
void linkedQueueType<Type>::initializeQueue()
{
    nodeType<Type> *temp;

    while (queueFront!= NULL)  //while there are elements left
                               //in the queue
    {
        temp = queueFront;  //set temp to point to the 
                            //current node
        queueFront = queueFront->link;  //advance first to  
                                        //the next node
        delete temp;    //deallocate memory occupied by temp
    }

    queueRear = NULL;  //set rear to NULL
} //end initializeQueue


template <class Type>
void linkedQueueType<Type>::addQueue(const Type& newElement)
{
    nodeType<Type> *newNode;

    newNode = new nodeType<Type>;   //create the node

    newNode->info = newElement; //store the info
    newNode->link = NULL;  //initialize the link field to NULL

    if (queueFront == NULL) //if initially the queue is empty
    {
        queueFront = newNode;
        queueRear = newNode;
    }
    else        //add newNode at the end
    {
        queueRear->link = newNode;
        queueRear = queueRear->link;
    }
}//end addQueue

template <class Type>
Type linkedQueueType<Type>::front() const
{
    assert(queueFront != NULL);
    return queueFront->info; 
} //end front

template <class Type>
Type linkedQueueType<Type>::back() const
{
    assert(queueRear!= NULL);
    return queueRear->info;
} //end back

template <class Type>
void linkedQueueType<Type>::deleteQueue()
{
    nodeType<Type> *temp;
   
    if (!isEmptyQueue())
    {
        temp = queueFront;  //make temp point to the 
                            //first node
        queueFront = queueFront->link; //advance queueFront 

        delete temp;    //delete the first node

        if (queueFront == NULL) //if after deletion the 
                                //queue is empty
            queueRear = NULL;   //set queueRear to NULL
    }
    else
        cout << "Cannot remove from an empty queue" << endl;
}//end deleteQueue


    //Destructor
template <class Type>
linkedQueueType<Type>::~linkedQueueType() 
{
    //Write the definition of the destructor
} //end destructor

template <class Type>
const linkedQueueType<Type>& linkedQueueType<Type>::operator=
                    (const linkedQueueType<Type>& otherQueue)
{
    //Write the definition of to overload the assignment operator

} //end assignment operator

	//copy constructor
template <class Type>
linkedQueueType<Type>::linkedQueueType
                 (const linkedQueueType<Type>& otherQueue) 
{
    //Write the definition of the copy constructor
}//end copy constructor

#endif

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品久久99| 日韩不卡一区二区| 国产日产欧美精品一区二区三区| 91精品国产综合久久久久久漫画| 色吧成人激情小说| 99re这里都是精品| 色婷婷亚洲一区二区三区| av中文字幕一区| 91麻豆国产福利在线观看| 97国产精品videossex| 国产精品一区二区视频| 国产不卡视频在线播放| 波多野结衣精品在线| av电影一区二区| 99久久精品国产精品久久| 色屁屁一区二区| 欧美性大战久久久| 欧美狂野另类xxxxoooo| 91精品国产欧美一区二区| 日韩一区二区三区电影 | 日韩一区和二区| 日韩欧美在线123| 久久五月婷婷丁香社区| 亚洲国产成人一区二区三区| 中文字幕日本不卡| 一区二区三区中文免费| 天堂av在线一区| 免费在线观看成人| 国产精品亚洲一区二区三区在线 | 亚洲成人免费av| 三级成人在线视频| 精品亚洲国内自在自线福利| 国产成人精品综合在线观看| 99久久99久久综合| 欧美日韩国产精选| 久久久午夜精品| 亚洲色图视频网| 日本午夜精品视频在线观看 | 捆绑调教美女网站视频一区| 国产一区二区免费在线| 91视频在线看| 91精品综合久久久久久| 久久精品日产第一区二区三区高清版| 成人免费在线视频观看| 五月天一区二区三区| 国产乱码一区二区三区| 在线视频亚洲一区| www一区二区| 亚洲综合免费观看高清完整版在线 | 高清shemale亚洲人妖| 91小视频在线| 精品久久人人做人人爰| 亚洲免费观看高清在线观看| 久久国产麻豆精品| 色哟哟精品一区| 久久精品视频免费| 视频一区在线视频| 成人免费黄色在线| 日韩女同互慰一区二区| 成人欧美一区二区三区在线播放| 青青青伊人色综合久久| 不卡av在线免费观看| 日韩视频在线永久播放| 亚洲人被黑人高潮完整版| 狠狠色综合日日| 欧美视频日韩视频在线观看| 中文字幕av一区二区三区免费看| 午夜精品久久久久久久久久 | 国产三级精品在线| 免费观看一级特黄欧美大片| 欧美又粗又大又爽| 中文av一区二区| 韩国欧美国产1区| 欧美日韩黄色影视| 亚洲免费观看高清| 国产在线播放一区二区三区| 91精品国产aⅴ一区二区| 亚洲欧美日韩国产另类专区| 国产精品一区二区三区乱码| 日韩一区二区三区四区| 亚洲乱码国产乱码精品精可以看 | 另类中文字幕网| 欧美日韩精品一二三区| 亚洲精品亚洲人成人网在线播放| 国产一区二区按摩在线观看| 91精品国产91热久久久做人人 | 精品亚洲免费视频| 911精品国产一区二区在线| 亚洲精品国产高清久久伦理二区| 国产成人a级片| 久久伊人蜜桃av一区二区| 蜜臀久久久久久久| 欧美日韩国产一区| 夜夜嗨av一区二区三区中文字幕| av一区二区久久| 国产精品素人视频| 丁香亚洲综合激情啪啪综合| 欧美精品一区二区三区高清aⅴ | 亚洲免费成人av| 99久精品国产| 亚洲欧美在线aaa| 99久久精品国产毛片| 亚洲欧美综合另类在线卡通| av亚洲精华国产精华精| 国产精品电影一区二区| 99视频精品免费视频| 国产精品成人免费| 色综合天天做天天爱| 亚洲免费在线观看视频| 91香蕉国产在线观看软件| 亚洲天堂免费在线观看视频| 97se亚洲国产综合在线| 亚洲欧美日本韩国| 91国产免费看| 午夜精品久久久久久久久久| 欧美一区二区视频观看视频 | 欧美日本乱大交xxxxx| 性做久久久久久久久| 欧美美女一区二区在线观看| 日韩av一区二区在线影视| 欧美一二三四区在线| 国产一区视频网站| 中文字幕中文乱码欧美一区二区| 91在线精品一区二区| 一区二区三区四区中文字幕| 欧美日韩精品一区视频| 久久精品国产**网站演员| 亚洲精品一区在线观看| 粉嫩一区二区三区性色av| 成人欧美一区二区三区1314| 欧美亚洲免费在线一区| 蜜臀av性久久久久蜜臀aⅴ流畅| 精品盗摄一区二区三区| 不卡一卡二卡三乱码免费网站| 亚洲精品你懂的| 91精品国产全国免费观看| 国产露脸91国语对白| 亚洲日本一区二区| 欧美精品第一页| 国产一区二区三区免费看| 亚洲视频综合在线| 51午夜精品国产| 懂色av一区二区三区免费看| 一区二区理论电影在线观看| 欧美一区二区在线视频| 国产美女精品人人做人人爽| 亚洲视频一区二区在线| 日韩亚洲欧美综合| 不卡影院免费观看| 首页综合国产亚洲丝袜| 久久精品日韩一区二区三区| 欧美少妇bbb| 国产寡妇亲子伦一区二区| 亚洲蜜臀av乱码久久精品 | 亚洲成人一区二区在线观看| 久久久九九九九| 欧美性淫爽ww久久久久无| 久国产精品韩国三级视频| 亚洲摸摸操操av| 精品国产伦一区二区三区观看方式| 99久久国产综合精品女不卡| 久久精品国产网站| 亚洲精品乱码久久久久久| 亚洲精品一区二区精华| 欧美系列亚洲系列| 国产成人一级电影| 日本成人在线不卡视频| 亚洲蜜桃精久久久久久久| 久久综合久久久久88| 欧美日韩电影在线| 91日韩精品一区| 国产乱人伦偷精品视频免下载| 亚洲成av人片在线| 亚洲欧美综合在线精品| 国产偷国产偷精品高清尤物 | 亚洲一区二区三区视频在线播放| 精品国产精品一区二区夜夜嗨| 欧美视频在线一区二区三区| 99视频超级精品| 国产一区二区三区四区在线观看| 丝袜a∨在线一区二区三区不卡| 亚洲人成小说网站色在线 | 亚洲欧美另类在线| 欧美精品一区二区三区蜜臀| 91精品啪在线观看国产60岁| 在线免费av一区| a级精品国产片在线观看| 国产福利一区二区| 狂野欧美性猛交blacked| 午夜免费久久看| 亚洲午夜av在线| 亚洲在线视频一区| 亚洲精品视频在线看| 成人免费一区二区三区视频 | 国产一区二区不卡| 精彩视频一区二区| 美女视频黄免费的久久| 五月激情综合网| 日韩av电影免费观看高清完整版在线观看| 亚洲人xxxx|