自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(20)
  • 资源 (2)
  • 收藏
  • 关注

原创 C++ 实现BitMap

C++ 实现BitMap#include <cstdint>class BitMap {private: uint64_t* m_arr; const int32_t RADIX = 64; const int32_t R_SHILT = 6; uint64_t m_maxValue;public: BitMap(uint64_t max_value) : m_maxValue(max_value){ uint32_t b

2022-01-16 23:27:46 331

转载 cmake 支持boost

cmake_minimum_required(VERSION 2.8)project(test)SET(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} &quot;-std=c++11&quot;)find_package(Boost REQUIRED COMPONENTS regex#filesystem )if(NOT Boost_FOUND) message(&quot;...

2018-08-05 00:43:25 1035

原创 boost 字符串与文本处理 -> lexical_cast

lexical_cast P178示例代码 #include <boost/lexical_cast.hpp> int main() { using namespace boost; int x = lexical_cast<int>("100"); long y = lexical_cast<long>("2000");

2017-03-03 10:32:50 358

原创 boost库uuid工具

uuid P161可以自定义一个头文件来使用uuid组件//uuids.hpp #include <boost/uuid/uuid.hpp>#include <boost/uuid/uuid_generators.hpp>#include <boost/uuid/uuid_io.hpp>using namespace boost::uuids;#include "uuids.hpp"usin

2017-03-02 15:50:41 459

原创 boost::exception

boost::exception 异常 P151 #include <boost/exception/all.hpp> using namespace boost; 代码 #include <string> #include <boost/exception/all.hpp> using namespace boost; struct my_exceptio

2017-03-01 16:15:35 635

原创 boost 实用工具

1. noncopyable P1102. typeof P1123. optional P1164. assign5. swap6. singleton 单件模式7. boost.serialzation 单件模式8. tribool --基于三态的布尔逻辑9. operators P140

2017-02-27 16:38:03 275

原创 boost pool库

一. pool库 -> pool P100返回一个简单数据类型(POD)的内存指针,如int、double等. #include <boost/pool/pool.hpp> using namespace boost; int main() { pool<> pl(sizeof(int)); //一个可分配int的内存池

2017-02-27 15:05:46 228

原创 boost smart_prt 4-> shared_ptr

shared_ptr P84引用计数型的智能指针 shared_ptr spi(new int); assert(spi); *spi = 253; shared_ptr sps(new string(“smart”)); assert(sps->size() == 5);shared_ptr提供operator<比较操作符,可用于标准关联容器 #include <iostre

2017-02-26 12:00:10 493

原创 boost smart_ptr 3-> scoped_array

scoped_array P82 scoped_array 类似scoped_ptr,封装了new[]操作符,为动态数组提供了一个代理 scoped_array<int> sa(new int[100]); sa[0] = 10; *(sa+1) = 20; 除非对性能有非常苛刻的要求,或者编译器不支持标准库,否则不建议使用scoped_array.

2017-02-26 11:28:01 211

原创 boost smart_ptr -> scoped_ptr

smart_ptr 库概述 C++98 校准的“自动指针”:std::auto_ptr #include <boost/smart_ptr.hpp> using namespace boost; scoped_ptr P78 只能在本作用域内使用,不希望被转让。a. 不支持比较操作 b. .swap()交换两个scoped_ptr保存的原始指针,高效操作。sc

2017-02-25 12:36:26 357

原创 boost 时间与日期

要点一、timer库 P33timer #include <boost/timer.hpp>using namespace boost;progress_timer P36 继承自timer,析构时自动输出时间 #include <boost/progress.hpp>using namespace boost;//将progress_timer的输出转移到时stringst

2017-02-24 14:36:01 355

原创 boost::assert学习笔记

P213要点头文件 #include assert.hpp> 默认情况下BOOST_ASSERT宏等同于assert宏,断言表达式为真,即: #define BOOST_ASSERT(expr) assert(expr)。如果参数expr表达式值为true,那么断言成立,程序会继续向下执行,否则断言会引发一个异常。BOOST_ASSERT宏仅会在debug模式下生效。

2017-02-24 13:59:33 2027

原创 boost::format常用用法

p167 头文件#include <boost/format.hpp>using namespace boost;一个简单的例子#include <boost/format.hpp>using namespace boost;int main(){ cout<< format("%s:%d+%d=%d\n")%"sum"%1%2%(1+2); format fmt("(%1

2017-02-22 16:01:30 1537 1

翻译 MFC 单文档标题栏菜单按钮重绘

1、在MainFrame中实现 OnMeasureItem和OnDrawItem函数void CMainFrame::OnMeasureItem( int nIDCtl, LPMEASUREITEMSTRUCT lpMeasureItemStruct ){ // TODO: 在此添加消息处理程序代码和/或调用默认值 lpMeasureItemStruct->itemWidth = ::G

2016-03-30 15:41:50 2027

原创 20160301 常用AFX函数

函数名称说明AfxAbort 无条件地终止一应用程序;通常在不可恢复错误发生时调用AfxBeginThread创建新的线程并开始执行它AfxEndThread终止当前执行的线程AfxMessageBox 显示Windows消息框 AfxGetApp 返回执行应用程序对象的指针AfxGetAppName

2016-03-01 11:39:18 496

转载 欢迎使用CSDN-markdown编辑器

欢迎使用Markdown编辑器写博客本Markdown编辑器使用StackEdit修改而来,用它写博客,将会带来全新的体验哦:Markdown和扩展Markdown简洁的语法代码块高亮图片链接和图片上传LaTex数学公式UML序列图和流程图离线写博客导入导出Markdown文件丰富的快捷键快捷键加粗 Ctrl + B 斜体 Ctrl + I 引用 Ctrl

2016-03-01 11:28:49 235

转载 ADO连接SQLServer数据库的连接字

1.    标准方式      ================================================      oConn.Open    "Provider=sqloledb;"    &    _                              "Data    Source=myServerName;"    &    _        

2013-12-15 13:04:52 1544

转载 VC 线程编程

转载于 程序风云在用VC6.0写程序调试时,初学者总是会遇到一些错误,针对如下错误主要是因为MFC类库没有引用所出现的问题。错误现象:nafxcwd.lib(thrdcore.obj) : error LNK2001: unresolved external symbol __endthreadexnafxcwd.lib(thrdcore.obj) : erro

2013-11-20 17:12:27 341

原创 MFC 非模态对话框覆盖主对话框销毁问题

将Create第二个参数改成GetDesktopWindow()可解决

2013-11-07 15:28:39 559

原创 关于sprintf_s第二个参数的用法

int sprintf( char *buffer, const char *format, [ argument] … );int sprintf_s(char *buffer,size_t sizeOfBuffer,const char *format [,argument] ...);sprintf_s第二个参数包含一个NULL字符,比

2013-10-31 10:21:41 2279 1

驱动级python模拟键盘输入

驱动级键盘模拟输入,scancode set2,只支持USB键盘,支持在游戏中输入

2019-05-03

AnkhSvn-2.5.

最新的源代码版本控制插件AnkhSvn-2.5.12471.17,需要和TortoiseSvn(SVN客户端)、VisualSvn Server配合使用,支持Microsoft Visual Studio 2005-2010, 2012, 2013, 和 "14"

2014-06-13

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除