![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
容器
青鱼29
这个作者很懒,什么都没留下…
展开
-
【C++】stack容器的用法解析
#define _CRT_SECURE_NO_WARNINGS 1#include <iostream>#include <stack>using namespace std;//Stack栈容器:容器适配器,遵循先进后出(FILO)数据结构//empty:判断堆栈元素是否为空,true表示栈元素为空;//pop:移除栈顶元素;//push:栈顶添加元素;//top:返回栈顶元素;//size:返回栈中元素数目;void test01(){ stack&.原创 2022-01-14 23:45:26 · 333 阅读 · 0 评论 -
C++容器的浅析
#define _CRT_SECURE_NO_WARNINGS 1#include <iostream>#include <vector>#include <algorithm>#include <string>using namespace std;void test01(){ int arr[] = { 10, 20, 30, 40, 50 }; int* p = arr; for (int i = 0; i < (sizeo.原创 2021-12-26 17:49:28 · 516 阅读 · 0 评论