C++单链表实现

明天考试,今天手写个单链表试试水。 原本觉得挺简单的,没想到仍是写了两个小时。一开始打算用模板类结果不太会用疯狂报错,最后只能搞个int型的。 只放代码。 和用vector写的程序对拍事后是正确的。c++ #include <bits/stdc++.h> using namespace std; typedef long long ll; class List; class Node //节点类
相关文章
相关标签/搜索