![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
程序设计
zjutsunny
这个作者很懒,什么都没留下…
展开
-
List.cpp
#include <list> #include <iostream> using namespace std; int main() { list<int> mylist (5,100); //5个100 mylist.push_front(-13); mylist.push_back (300); //表尾插入 list<in...原创 2019-10-08 09:59:36 · 208 阅读 · 0 评论 -
Set.cpp
#include <set> #include <iostream> using namespace std; int main() { set <string> str; set <string>::iterator pos; str.insert("apple"); str.insert("orange"); str.insert("...原创 2019-10-09 12:22:46 · 116 阅读 · 0 评论 -
Queue的使用
#include <queue> #include <iostream> using namespace std; int main() { queue <int> q; q.push(1); q.push(2); q.push(3); q.push(9); cout<<q.size()<<endl; //返回队例元素数量 c...原创 2019-10-09 15:29:51 · 72 阅读 · 0 评论 -
Priority Queue的使用
#include <iostream> #include <queue> using namespace std; struct info { string name; float score; bool operator < (const info &a) const { return a.score<score; } }; int ...原创 2019-10-09 15:35:33 · 65 阅读 · 0 评论 -
Map的使用
#include <map> #include <iostream> using namespace std; int main() { map <string,float,less<string> > c; //应用make_pair()构造元素 c.insert (make_pair("Cafe",7.75)); c.insert (m...原创 2019-10-09 15:40:24 · 111 阅读 · 0 评论 -
Vector的使用
#include <cstring> #include <vector> #include <iostream> using namespace std; int ar[10] = { 12, 45, 234, 64, 12, 35, 63, 23, 12, 55 }; char* str = "Hello World"; int main() { ve...原创 2019-10-09 15:44:01 · 128 阅读 · 0 评论