// stackTest.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <iostream>
#include<stack>
#include <vector>
#include <deque>
using namespace std;
/*
stack是一个后进先出操作元素的容器适配器
stack默认使用的基础容器是deque
也可以使用vector,list或者任何其它特定设计的容器,唯一要求就是支持下列操作:
* back()
* push_back()
* pop_back()
*/
int _tmain(int argc, _TCHAR* argv[])
{
/*
构造函数
*/
vector<int> vec1(20, 20);
deque<int> deque1(20, 30);
stack<int, vector<int> > stack1(vec1);
stack<int> stack2(deque1);
/*
(constructor) Construct stack (public member function)
empty Test whether container is empty (public member function)
size Return size (public member function)
top Access next element (public member function)
push Add element (public member function)
pop Remove element (public member function)
*/
return 0;
}