2012年12月30日

stl 的utility

摘要: std::pair#include <iostream>#include <utility>#include <string>using namespace std;int main () { pair <string,double> product1 ("tomatoes",3.25); pair <string,double> product2; pair <string,double> product3; product2.first = "lightbulbs"; // ty 阅读全文

posted @ 2012-12-30 14:41 GIS-MAN 阅读(438) 评论(0) 推荐(0) 编辑

c++ 好玩的类

摘要: http://www.cplusplus.com/reference/valarray/valarray/valarray/ A valarray object is designed to hold an array of elements, and easily perform mathematical operations on them. // valarray constructo... 阅读全文

posted @ 2012-12-30 11:56 GIS-MAN 阅读(391) 评论(0) 推荐(0) 编辑

algorithms 演算法

摘要: 阅读全文

posted @ 2012-12-30 11:19 GIS-MAN 阅读(131) 评论(0) 推荐(0) 编辑

迭代器

摘要: 迭代器是内部做好的模板 可以用在迭代器的操作有 *, ++, ==, !=, list<char> testchar; list<char>::iterator pos; for(pos=testchar.begin();pos!=testchar。end();++pos) // 一般用++pos ,不是pos++ ,这样更快 { cout<< *pos; // *pos 代表当前元... 阅读全文

posted @ 2012-12-30 10:58 GIS-MAN 阅读(236) 评论(0) 推荐(0) 编辑

导航