stack STL 中栈的简单使用
来源:互联网 发布:unity3d 离线使用 编辑:程序博客网 时间:2024/05/17 20:30
#include "stdafx.h"
#include <iostream>
#include <stack>
#include "Windows.h"
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
stack<int> nMyStack;//
int i = 0;
cout << "入栈。。。" << endl;
cout <<"----------------------------------------------------------------/n";
for(i = 0; i < 10; i++)
{
cout << i << "入栈/t";
nMyStack.push(i);
cout<< "当前栈顶元素" << nMyStack.top() << "/t元素个数" << nMyStack.size() << endl;
}
cout << "/n出栈。。。" << endl;
cout << "----------------------------------------------------------------/n";
while(!nMyStack.empty())
{
cout << nMyStack.top() << "出栈/t";
nMyStack.pop();
}
if(nMyStack.empty())
{
cout<<"栈已为空!";
}
return 0;
}
- stack STL 中栈的简单使用
- STL stack简单使用
- STL 栈stack的使用
- STL 标准模板库 中栈stack 容器的使用
- C++ STL中stack/queue的使用
- STL stack的使用
- STL 简单 stack 的实现
- c++ STL中栈stack的用法
- STL 中栈的使用方法(stack)
- STL中stack(栈)的用法
- 【day0414 C++】STL stack 栈的使用
- 栈的简单实现——使用C++容器库(STL Stack)
- STL中stack的用法
- STL中stack的用法
- STL中stack的用法
- c++ stl栈stack使用
- 关于c++中的STL中的栈stack的使用
- STL中map的简单使用
- C++与C的相互调用
- Get latest moodle from Eclipse cvs
- 分布式缓存系统Memcached简介与实践
- 生病了……
- Android学习笔记(四) Hello World
- stack STL 中栈的简单使用
- JS失去焦点事件
- Delphi下的COM编程技术 - 1
- SNMP Agent开发
- wxWidgets滚动窗口绘图总结
- Oracle函数大全
- 如何撰写POD
- 最近找的一些物联网的资料,稍微整理了下
- 我想有自己的作品啊