![](https://img-blog.csdnimg.cn/20201014180756757.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
文章平均质量分 63
chn89
这个作者很懒,什么都没留下…
展开
-
算法经典代码块
二分查找的代码.int bfind(int* a,int len,int val){ int m = len/2; int l = 0; int r = len; while(l!=m && r!= m) { if(a[m] > val) { r = m;转载 2012-01-05 21:15:22 · 414 阅读 · 0 评论 -
C++ 记录1
using namespace std:cout using namespace std #include using std::string string s1; string s2(s1); string s3("value"); string s4(n,'c'); getline(cin,line_string);s.empty()原创 2012-01-11 20:17:23 · 458 阅读 · 0 评论 -
C++ 记录2
容器与迭代器 container::iterator container::const_iteratorcontainer::size_typec.begin()c.end()c.rbegin()c.rend()container c;container c(c1);container c(n);//n个元素的容器container c(n,原创 2012-01-11 20:24:33 · 484 阅读 · 0 评论 -
容器,迭代器,算法使用小例
1 #include 2 #include 3 #include 4 5 using std::string; 6 using std::cin; 7 using std::cout; 8 using std::endl; 9 10 int main(){ 11 12 std::vector v; 13 int s; 14 s原创 2012-01-05 21:12:46 · 424 阅读 · 0 评论 -
容器与迭代器 速记
container::iterator container::const_iteratorcontainer::size_typec.begin()c.end()c.rbegin()c.rend()container c;container c(c1);container c(n);//n个元素的容器container c(n,t);contai原创 2012-01-05 21:13:48 · 594 阅读 · 0 评论 -
C++别人的总结
前言 我的blog以前很长一段时间关注的都是C++中的技术&细节,乃至于读者和应者都寥寥。然而5月份的时候写的一篇“你应当如何学习C++”,阅读量却达到了3万多,在blog上所有文章中却是最高的(且远远超过了第二位);评论数目也有一百多。为什么独独这篇能够激起这么多的回应,想必是国内的C++社群被C++压抑太久,或者,严格来说,是被C++的教育方式压抑太久。实际上,不管是在各大国内论坛转载 2012-01-04 09:50:35 · 727 阅读 · 0 评论 -
C++算法及迭代使用小例
1 #include 2 #include 3 #include 4 5 using std::string; 6 using std::cin; 7 using std::cout; 8 using std::endl; 9 10 int main(){ 11 12 std::vector v; 13 int s; 14原创 2012-02-20 20:47:33 · 881 阅读 · 2 评论