摘要: #include #include #include using namespace std; int main() { listl1, l2, l3; string s1, s2; cin >> s1; cin >> s2; //储存大数 for (int i = 0; i::iterator it1, it2; it1 = l1.begin(); it2 = l2.beg... 阅读全文
posted @ 2016-10-11 23:47 KennyRom 阅读(295) 评论(0) 推荐(0) 编辑
摘要: //List容器 //List本质是一个双向链表 //构造函数 listc0; //空链表 listc1(3); //建一个含三个默认值是0的元素链表 listc2(5,2); //含5个元素,值都是2 listc4(c2); //复制链表 listc5(c1.begin(), c1.end()); //c5包含c1的一个区域元素 //成员函... 阅读全文
posted @ 2016-10-11 20:35 KennyRom 阅读(215) 评论(0) 推荐(0) 编辑
摘要: //自己造容器--List /* 1、iterator 2、头迭代器 3、尾迭代器 4、链表长 5、判空 6、清除 7、取头元素 8、取尾元素 9、头插入 10、尾插入 11、头删除 12、尾删除 13、插入函数 14、删除函数 */ template class List { private: //结点 struct Node { Object data; Node *prev... 阅读全文
posted @ 2016-10-11 14:53 KennyRom 阅读(144) 评论(0) 推荐(0) 编辑