STL
369pro
这个作者很懒,什么都没留下…
展开
-
简易stack
// 简易stack#include<cstdio>#include<iostream>using namespace std;template<typename T>class stack {private: T* pstack; int capacity, top,size=0;public: stack(int c = 5):top(-1), capacity(c) { pstack = new T[capacity]; cout <原创 2021-08-16 17:29:51 · 59 阅读 · 0 评论 -
模拟list(列表)
// 模拟list#include<cstdio>#include<cstdlib>#include<iostream>using namespace std;//#define node<T> list_node<T>*;#define ptr_node list_node<T>*template<typename T> struct list_node{ T data; ptr_node pre;原创 2021-08-16 12:17:26 · 118 阅读 · 0 评论 -
C++模拟vector
// 模拟vector#include<cstdio>#include<iostream>#include<cmath>#include"Fibonacci.h"#define DEFAULT_CAPACITY 10using namespace std;using Rank = int; //typedef int Rank ,与using相比,差了点template<typename T&g原创 2021-08-09 07:20:36 · 154 阅读 · 0 评论 -
C++的左右值
转载自此处转载 2021-08-01 16:53:57 · 200 阅读 · 0 评论