摘要: #include #include #include #include #include #include #include #include #include #include using namespace std;int main(){ boost::timer t; std::cout v(... 阅读全文
posted @ 2015-12-18 16:26 Chen5138221 阅读(252) 评论(0) 推荐(0) 编辑
摘要: 1 bind/function(1)头文件bind函数#include function使用头文件#include 如果写程序时出错则在function及bind前面加上限定:"boost::"(2)功能bind绑定一个函数及其参数.function是类和模板的组合,它定义的对象可以指向一个函数(包... 阅读全文
posted @ 2015-11-11 14:51 Chen5138221 阅读(208) 评论(0) 推荐(0) 编辑
摘要: 检测U盘的插入或拔出状态,然后根据状态做出相关操作。检测U盘是否被插入是通过监听WM_DEVICECHANGE消息来实现的。判断-U盘拔出和插入-获取它盘符2010-05-04 10:59加入消息ON_WM_DEVICECHANGE(OnDeviceChange)加入afx_msg void OnD... 阅读全文
posted @ 2015-11-07 16:52 Chen5138221 阅读(1452) 评论(0) 推荐(0) 编辑
摘要: 1,CString类型 转化为 string类型 string = CString .getstring(); 注:CString .getstring() 转换为const char * 类型 系统在自动转换为 string类型;2, string 类型 转化为 CString类型 CString... 阅读全文
posted @ 2015-11-05 15:31 Chen5138221 阅读(949) 评论(0) 推荐(0) 编辑
摘要: 本文将整理动态链接库dll的封装方法及调用的方法。(以VS2010为开发平台)1,动态链接库dll的封装方法封装步骤:(1),在VS2010中新建一个win32->dll工程;(2),新建一个头文件Dll1.h#ifndef DLL1_API#define DLL1_API extern "C" _... 阅读全文
posted @ 2015-10-22 17:04 Chen5138221 阅读(6788) 评论(0) 推荐(1) 编辑
摘要: 对于一副图像,如果矩阵元素存储的是单通道像素,使用C或C++的无符号字符类型,那么像素可有256个不同值。但若是三通道图像,这种存储格式的颜色数就太多了(确切地说,有一千六百多万种)。用如此之多的颜色可能会对我们的算法性能造成严重影响。其实有时候,仅用这些颜色的一小部分,就足以达到同样效果。这种情况... 阅读全文
posted @ 2015-10-22 11:39 Chen5138221 阅读(532) 评论(0) 推荐(0) 编辑