posted @ 2013-05-22 11:23 Roger Luo 阅读(294) 评论(0) 推荐(0) 编辑
摘要:
Chinese character doesn’t display normally on Windows 7 English Version. 英文版win7中文乱码 1. Control Panel->Change display language 2. Use option “Administrative”->change system locale… 3. Change to... 阅读全文
摘要:
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 阅读(1306) 评论(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 阅读(1106) 评论(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 阅读(2382) 评论(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 阅读(445) 评论(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 阅读(126) 评论(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 阅读(744) 评论(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 阅读(353) 评论(0) 推荐(0) 编辑