2014年9月17日

OpenCV on Mac OSX: A step-by-step guide

摘要: I’m using OpenCV for my 4th year design project and setting it up was a huge pain. I had to look through a whole bunch of different sites to figure ou... 阅读全文

posted @ 2014-09-17 20:05 lakeone 阅读(348) 评论(0) 推荐(0) 编辑

opencv打开摄像头获取视频程序

摘要: //// main.cpp// opencv3//// Created by PKU on 14-9-16.// Copyright (c) 2014年 PKU. All rights reserved.//#include using namespace cv;using namespac... 阅读全文

posted @ 2014-09-17 20:03 lakeone 阅读(835) 评论(0) 推荐(0) 编辑

2014年9月8日

使用find_if算法搜寻map的value

摘要: //// main.cpp// map_find//// Created by PKU on 14-9-8.// Copyright (c) 2014年 PKU. All rights reserved.//#include #include #include using namespace... 阅读全文

posted @ 2014-09-08 17:01 lakeone 阅读(478) 评论(0) 推荐(0) 编辑

c++如何理解map对象的value_type是pair类型

摘要: map 是以 pair形式插入的。map中的元素的类型value_typetypedef pair value_type;value_type 被声明为 pair 但并不是简单的 pair 因为用一个非常量的迭代器或引用不能改变关联容器的Key。#include #include int mai... 阅读全文

posted @ 2014-09-08 16:04 lakeone 阅读(3890) 评论(0) 推荐(1) 编辑

关联容器执行器指定排序规则

摘要: //// main.cpp// setcmp//// Created by IDM-PKU on 14-9-6.// Copyright (c) 2014年 PKU. All rights reserved.//#include #include #include "print.hpp"us... 阅读全文

posted @ 2014-09-08 15:53 lakeone 阅读(344) 评论(0) 推荐(0) 编辑

2014年9月3日

仿函数和函数配接器

摘要: //// main.cpp// function_adaptor//// Created by IDM-PKU on 14-9-3.// Copyright (c) 2014年 PKU. All rights reserved.//#include #include #include #in... 阅读全文

posted @ 2014-09-03 10:34 lakeone 阅读(368) 评论(0) 推荐(0) 编辑

2014年8月31日

C++的异常处理

摘要: 一、什么是异常处理 一句话:异常处理就是处理程序中的错误。二、为什么需要异常处理,以及异常处理的基本思想 C++之父Bjarne Stroustrup在《The C++ Programming Language》中讲到:一个库的作者可以检测出发生了运行时错误,但一般不知道怎样去处理它们(因为和用户具... 阅读全文

posted @ 2014-08-31 09:29 lakeone 阅读(255) 评论(0) 推荐(0) 编辑

2014年8月15日

back_insert_iterator和insert_iterator

摘要: #include #include #include #include #include void output(const std::string & s){std::cout words(4); copy(s1,s1+4,words.begin()); for_each(words... 阅读全文

posted @ 2014-08-15 19:49 lakeone 阅读(635) 评论(0) 推荐(0) 编辑

copy函数与ostream_iterator、reverse_iterator

摘要: #include #include #include int main(){ using namespace std; int casts[10]={6,7,2,9,4,11,8,7,10,5}; vector dice(10); copy(casts,casts+10,di... 阅读全文

posted @ 2014-08-15 19:46 lakeone 阅读(297) 评论(0) 推荐(0) 编辑

2014年7月21日

const_cast

摘要: #include using std::cout;using std::endl;void change(const int * pt, int n);int main(){ int pop1=38383; const int pop2=2000; cout (pt); *p... 阅读全文

posted @ 2014-07-21 21:41 lakeone 阅读(199) 评论(0) 推荐(0) 编辑

导航