
C++
@蛤
这个作者很懒,什么都没留下…
展开
-
栈模板(C++实现)
#include<iostream> #include<string> #include<vector> using namespace std; template<typename T> class Stack{ private: vector<T> elems;//这里如果用二维数组会怎么样呢 public: vo...原创 2019-07-06 17:22:42 · 297 阅读 · 0 评论 -
c++指针逆置的几种方法
唔。。。这指针逆置就先列一些我已经看懂了的简单的方法吧原创 2020-05-06 08:42:38 · 250 阅读 · 0 评论 -
c++多态
#include <iostream> using namespace std; class Shape { protected: int width, height; public: Shape( int a=0, int b=0) { width = a; height = b; } int area() {原创 2020-05-06 08:41:43 · 131 阅读 · 0 评论