Roger Luo

超越梦想一起飞
  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

随笔分类 -  C/C++

摘要:在Windows 8 64 bit下执行boost_1_53_0的bootstrap.bat出现了jam0.exe执行错误 搜索网页发现需要修改两处文件: tools/build/v2/engine/filent.c 将line 82中的long修改成intptr_t PATHNAME f; string filespec[ 1 ]; string fi... 阅读全文

posted @ 2013-06-18 23:46 Roger Luo 阅读(519) 评论(0) 推荐(0)

摘要:a 阅读全文

posted @ 2013-06-18 08:49 Roger Luo 阅读(292) 评论(0) 推荐(0)

摘要:Mingw The MinGW project maintains and distributes a number of different core components and supplementary packages, including various ports of the GNU toolchain, such as GCC and binutils, translated ... 阅读全文

posted @ 2013-06-18 08:45 Roger Luo 阅读(1291) 评论(0) 推荐(0)

摘要:platform: vs2012 Code#include #include using namespace std;void Fun(){ cout#include using namespace std;int main(){ std::thread th([](){ cout#include #include #include using namespace std;int main(){... 阅读全文

posted @ 2013-06-17 21:01 Roger Luo 阅读(446) 评论(0) 推荐(0)

摘要:如果当你选择需要编译x64版本,但是不能从当前的x86版本复制过来的话 可以选择先将“生成”的选项去掉,接着再将其选上 阅读全文

posted @ 2013-06-08 17:02 Roger Luo 阅读(4438) 评论(0) 推荐(0)

摘要:Create Directory Using Windows api, include <windows.h> if (0 == ::CreateDirectoryA(_root.c_str(), nullptr)) { DWORD errcode = ::GetLastError(); if (errcode == ERROR_ALREADY_EXI... 阅读全文

posted @ 2013-05-20 11:54 Roger Luo 阅读(1328) 评论(0) 推荐(0)

摘要:Functors Compared with Function Pointers If you have a function that takes a function pointer, you cannot pass in a functor as though it were a function pointer, even if the functor has the same argu... 阅读全文

posted @ 2013-05-12 18:39 Roger Luo 阅读(1156) 评论(0) 推荐(0)

摘要:Regarding their syntax, there are two different types of function pointers: On the one hand there are pointers to ordinary C functions or to static C++ member functions. On the other hand there are po... 阅读全文

posted @ 2013-05-11 19:37 Roger Luo 阅读(2395) 评论(0) 推荐(0)

摘要:用途 1. 简化代码书写,尤其使用boost库,iterator或者指针等 typedef boost::filesystem::recursive_directory_iterator bf_rdit;typedef char * PCHAR;// PCHAR p1, p2; // both p1 and p2 are pointer2. 实现跨平台 #ifdef _WIN32 || ... 阅读全文

posted @ 2013-05-11 15:26 Roger Luo 阅读(453) 评论(0) 推荐(0)

摘要:123 阅读全文

posted @ 2013-05-10 18:11 Roger Luo 阅读(158) 评论(0) 推荐(0)

摘要:Follow book from Nicolai M. Josuttis, The C++ Standard Library - A Tutorial and Reference, 2nd Edition 阅读全文

posted @ 2013-05-10 18:11 Roger Luo 阅读(130) 评论(0) 推荐(0)

摘要:Generalize Sequence containers 序列容器 Array, c++11 std::forward_list, c++11 singly-linked lists main design difference between a forward_list container and a list container is that the first ... 阅读全文

posted @ 2013-05-10 17:47 Roger Luo 阅读(758) 评论(0) 推荐(0)

摘要:#pragma intrinsic (_InterlockedIncrement)#pragma intrinsic (_InterlockedDecrement)#pragma intrinsic (memcpy)The intrinsic pragma tells the compiler that a function has known behavior. The compiler may... 阅读全文

posted @ 2013-05-06 18:14 Roger Luo 阅读(363) 评论(0) 推荐(0)

摘要:Hight light the variable in the whole document choose the variable and then click “shit + F8” Add search path for header files Under Options->Preferences->Project Symbol Path, add the absolution pa... 阅读全文

posted @ 2013-05-06 18:14 Roger Luo 阅读(428) 评论(0) 推荐(0)

摘要:? Differences between CreateThread and _beginthread ! There are four methods to terminate sub thread return from the end of the function ExitThread itself TerminateThread by other thread ... 阅读全文

posted @ 2013-04-27 21:30 Roger Luo 阅读(152) 评论(0) 推荐(0)

摘要:Format ZIP 是一个计算机文件的压缩的算法,原名Deflate(真空),发明者为菲尔·卡茨(Phil Katz)),他于1989年1月公布了该格式的资料。ZIP通常使用后缀名“.zip”,它的MIME格式为 application/zip 。目前,ZIP格式属于几种主流的压缩格式之一,其竞争者包括RAR格式以及开放源码的7-Zip格式。从性能上比较,RAR格式较ZIP格式压缩率较高,而... 阅读全文

posted @ 2013-04-25 19:06 Roger Luo 阅读(374) 评论(0) 推荐(0)

摘要:Zlib official website is www.zlib.net References 开源代码:http://www.zlib.net/ zlib使用手册:http://www.zlib.net/manual.html zlib wince版:http://www.tenik.co.jp/~adachi/wince/ Zlib dll named as Zlib1... 阅读全文

posted @ 2013-04-24 19:29 Roger Luo 阅读(344) 评论(0) 推荐(0)

摘要:出现这个错误基本由于Lambda中没有显示地说明返回值类型,而是由编译器自己推断返回值。下面是从C++11官方文档中抄过来的 If a lambda-expression does not include a trailing-return-type, it is as if the trailing-return-type denotes the following type: ... 阅读全文

posted @ 2013-04-16 13:35 Roger Luo 阅读(369) 评论(0) 推荐(0)

摘要:wstring to string string CUtility::TCHAR2char(TCHAR* tchStr){ int iLen = 2*wcslen(tchStr); char* chRtn = new char[iLen+1]; memset(chRtn, 0, iLen + 1); wcstombs(chRtn,tchStr,iLen+1); ... 阅读全文

posted @ 2013-03-26 14:59 Roger Luo 阅读(1485) 评论(0) 推荐(0)

摘要:class ComplexA{public: ComplexA(int len):_l(len), _p(new char[_l]){cout<<"ComplexA::ComplexA"<<endl;} ~ComplexA(){cout<<"ComplexA::~ComplexA"<<endl; if (_p != nullptr) delete _p;}private: ... 阅读全文

posted @ 2013-03-18 21:01 Roger Luo 阅读(1442) 评论(1) 推荐(0)