随笔分类 -  C++

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页
摘要:C++ 元素计数 count() algostuff.hpp testCount.cpp vec1: 1 2 3 4 5 6 7 8 9number of elements equal to 4: 1number of elements with even value: 4number of ele 阅读全文
posted @ 2020-01-02 20:04 西北逍遥 阅读(6652) 评论(0) 推荐(0)
摘要:C++ for_each() 算法 for_each()算法非常灵活,它允许你以不同的方式访问、处理、修改每一个元素,自C++11起,for循环提供了更方便更自然的行为,因此,for_each()恐将日渐丧失其重要性。 algostuff.hpp main.cpp 1 2 3 4 5 6 7 8 9 阅读全文
posted @ 2020-01-01 19:43 西北逍遥 阅读(3294) 评论(0) 推荐(0)
摘要:C++ Stream(串流)迭代器 4277-51234567891 < 2 < 3 < 4 < 5 < 6 < 7 < 8 < 9 <请按任意键继续. . . 代码参考:C++标准库(第2版) 代码参考:C++标准库(第2版) 代码参考:C++标准库(第2版) 阅读全文
posted @ 2019-12-30 19:54 西北逍遥 阅读(414) 评论(0) 推荐(0)
摘要:C++ deque const_iterator const_reverse_iterator运用实例 23456 65432 请按任意键继续. . . 代码参考:C++标准库(第2版) 代码参考:C++标准库(第2版) 阅读全文
posted @ 2019-12-29 16:03 西北逍遥 阅读(362) 评论(0) 推荐(0)
摘要:iter_swap函数用来交换两个迭代器所指向的元素值,迭代器类型不必相同,但其所指的值必须可以相互赋值(assignable)。 myprint.hpp test.cpp 1 2 3 4 5 6 7 8 92 1 3 4 5 6 7 8 99 1 3 4 5 6 7 8 2请按任意键继续. . . 阅读全文
posted @ 2019-12-28 19:42 西北逍遥 阅读(1112) 评论(0) 推荐(0)
摘要:C++ distance() 处理迭代器之间的距离 difference between begining and 5: 8请按任意键继续. . . 代码参考:C++标准库(第2版) 阅读全文
posted @ 2019-12-28 19:27 西北逍遥 阅读(3923) 评论(2) 推荐(1)
摘要:C++ advance()运用案例 032请按任意键继续. . . 代码参考:C++标准库(第2版) 代码参考:C++标准库(第2版) 代码参考:C++标准库(第2版) 阅读全文
posted @ 2019-12-27 16:45 西北逍遥 阅读(669) 评论(0) 推荐(0)
摘要:C++ unordered_set运用实例 17 1 2 19 11 3 13 5 7 23 29 31 37 4117 1 2 19 11 3 13 5 7 23 29 31 37 41 -7 33 -1117 1 2 19 11 3 13 5 7 23 29 31 37 41 -7 -1117 阅读全文
posted @ 2019-12-20 10:39 西北逍遥 阅读(4421) 评论(0) 推荐(0)
摘要:C++ Multimap运用实例—查找元素 3 97 3请按任意键继续. . . 代码参考:C++标准库(第2版) 阅读全文
posted @ 2019-12-19 20:09 西北逍遥 阅读(852) 评论(0) 推荐(0)
摘要:C++ Multimap运用实例 english german car Auto clever raffiniert day Tag smart elegant smart raffiniert smart klug strange fremd strange seltsam trait Merkm 阅读全文
posted @ 2019-12-19 19:45 西北逍遥 阅读(856) 评论(0) 推荐(0)
摘要:C++ Map运用实例 stock1:BASF price:369.5stock1:BMW price:834stock1:Daimler price:819stock1:Simements price:842.2stock1:VW price:413.5 stock1:BASF price:739 阅读全文
posted @ 2019-12-18 20:54 西北逍遥 阅读(1110) 评论(0) 推荐(0)
摘要:C++ Set运用实例 6 5 4 3 2 14 already exists1 2 3 4 5 61 element(s) removed3 4 6请按任意键继续. . . 代码参考:C++标准库(第2版) 阅读全文
posted @ 2019-12-17 19:16 西北逍遥 阅读(525) 评论(0) 推荐(0)
摘要:C++ list运用实例 list1:0 1 2 3 4 5list2:5 4 3 2 1 0 list1:list2:5 4 0 1 2 3 4 5 3 2 1 0 list1:list2:4 0 1 2 3 4 5 3 2 1 0 5 list1:0 0 1 1 2 2 3 3 4 4 5 5l 阅读全文
posted @ 2019-12-16 19:49 西北逍遥 阅读(481) 评论(0) 推荐(0)
摘要:C++ vector C++, test1 test2 test3 test4max_size:461168601842738790size:5capacity:6C++, test3 test2 TEST test1 Javasize:6capacity:6size:4capacity:4请按任意 阅读全文
posted @ 2019-12-15 20:08 西北逍遥 阅读(564) 评论(0) 推荐(0)
摘要:myprint.hpp test.cpp 3 7 9 5 2 0 0 0 0 03 7 9 5 2 0 0 0 555 666sum:1247 -3 -7 -9 -5 -2 0 0 0 -555 -666请按任意键继续. . . 阅读全文
posted @ 2019-12-14 20:12 西北逍遥 阅读(545) 评论(0) 推荐(0)
摘要:4 8 400010100010000000011010000000000000000000000000000000000000000000000000001000001101000000000000000000000请按任意键继续. . . 阅读全文
posted @ 2019-12-13 17:17 西北逍遥 阅读(1111) 评论(0) 推荐(0)
摘要:本质:引用是别名,指针是地址,具体的: ①从现象上看,指针在运行时可改变其所指向的值,而引用一旦和某个对象绑定后就不在改变。这句话可以这样理解:指针可以被重新赋值以指向另一个不同的对象。但是引用总指向在初始化时被指定的对象,以后不能改变,但是指定的对象内容可以改变。 ②从内存上分配看,程序为指针变量 阅读全文
posted @ 2019-12-13 16:27 西北逍遥 阅读(953) 评论(0) 推荐(0)
摘要:#include <iostream> #include <list> using namespace std; int main() { list<char> list1; for (char c1='a';c1<='z';++c1) { list1.push_back(c1); } list<c 阅读全文
posted @ 2019-12-12 20:18 西北逍遥 阅读(214) 评论(0) 推荐(0)
摘要:Algorithm测试 #include <algorithm> #include <vector> #include <iostream> using namespace std; int main() { vector<int> vec_1 = {3,7,6,2,1,8,9}; auto min 阅读全文
posted @ 2019-12-11 19:42 西北逍遥 阅读(183) 评论(0) 推荐(0)
摘要:array 0 test11 test2234 阅读全文
posted @ 2019-12-10 16:33 西北逍遥 阅读(283) 评论(0) 推荐(0)

上一页 1 ··· 12 13 14 15 16 17 18 19 20 ··· 33 下一页