
STL学习
文章平均质量分 77
u010856711
这个作者很懒,什么都没留下…
展开
-
stl 中 容器 set 类基础运算 交集 并集 差集 (2)
以下的代码是对集合的交集 并集 差集 运算测试:// stlset2.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include #include #include #include using namespace std;原创 2013-06-17 09:53:27 · 1233 阅读 · 0 评论 -
stl 中 容器 set 类插入,删除,遍历,其中存储的元素为基础类型 int (1)
集合类型的元素级别简单操作测试// stlset.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include "set"using namespace std;int _tmain(int argc, _TCHAR* argv[]){ //原创 2013-06-15 15:05:31 · 1258 阅读 · 0 评论 -
STL 中 容器 list 的使用
以下代码测试了stl 中 容器 list的简单使用方法,包括如何插入一条数据到list,遍历list, 删除一条数据等。 #pragma once#include "string"#include "list"#include "vector"#include "iostream"#include "algorithm"using namespace std原创 2013-06-25 10:16:14 · 891 阅读 · 0 评论 -
STL 中容器 map 的使用
以下代码实现stl中容器 map 的简单操作。包括插入,更新,遍历,查找。 #pragma once#include "string"#include "iostream"#include "map"using namespace std;class CStudent{ string name; int english;public: C原创 2013-06-25 10:24:53 · 845 阅读 · 0 评论 -
list 中删除满足某个条件的所有记录
#include "stdafx.h"#include "Singlelist.h"#include using namespace std;typedef list LIST;typedef LIST::iterator ITERATOR;int _tmain(int argc, _TCHAR* argv[]){ LIST mylist; for(int i=0;原创 2014-03-05 09:39:56 · 1659 阅读 · 0 评论