Chinaunix首页 | 论坛 | 博客
  • 博客访问: 88283
  • 博文数量: 34
  • 博客积分: 2000
  • 博客等级: 大尉
  • 技术积分: 395
  • 用 户 组: 普通用户
  • 注册时间: 2009-03-23 10:22
文章分类

全部博文(34)

文章存档

2011年(1)

2010年(4)

2009年(29)

我的朋友

分类: C/C++

2009-05-09 15:24:34

#include "stdafx.h"
#include
#include
#include
using namespace std;
/************************
*STL堆栈类的使用实例
*********************/
int main()
{
 stack intStack;
 intStack.push (12);
 intStack.push (23);
 intStack.push (34);
 intStack.push (45);
 cout<<"The top element of the stack:"< cout< 
 cout<<"intStack element:"< while(!intStack.empty ())
 {
  cout<  intStack.pop();
 }
 cout< return 0;
}
阅读(1588) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~