http://www.cplusplus.com/reference/ Standard C++ Library reference C Library The elements of the C language library are also included as a subset of the C++ Standard library. These cover many aspects, from general utility functions and macros to in…
zcelib - One cplusplus C++ crossplatform library use for develop server,similar to ACE.OS适配层,为了适应WINDOWS和LINUX两个环境的代码增加的一层,同时都有一些扩展,基本可以替代ACE了.这部分其实用不少有趣的代码,主要思路是在Windows下模拟Posix的代码.让我的代码可以在Windows下直接调试.这部分代码都是以 zce_os_adapt_XXX 开头命名的.代码都是在ZCE_LIB名字空…
Multibyte characters mblen Get length of multibyte character (function ) mbtowc Convert multibyte sequence to wide character (function ) wctomb Convert wide character to multibyte sequence (function ) Multibyte strings mbstowcs Convert multibyte stri…
std::set template < class T, // set::key_type/value_type class Compare = less<T>, // set::key_compare/value_compare class Alloc = allocator<T> // set::allocator_type > class set; Set Sets are containers that store unique elements followi…
std::priority_queue template <class T, class Container = vector<T>, class Compare = less<typename Container::value_type> > class priority_queue; Priority queue Priority(优先) queues are a type of container adaptors, specifically designed s…
std::queue template <class T, class Container = deque<T> > class queue; FIFO queue queues are a type of container adaptor, specifically designed to operate in a FIFO context (first-in first-out), where elements are inserted into one end of the…
std::list template < class T, class Alloc = allocator > class list; List Lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence, and iteration in both directions. List containers are implement…
std::forward_list template < class T, class Alloc = allocator > class forward_list; Forward list Forward lists are sequence containers that allow constant time insert and erase operations anywhere within the sequence. Forward lists are implemented a…
There are some Common Bugs in C Programming. Most of the contents are directly from or modified from Prof. Liu Pangfeng's blog. Most credits should go to him. For all the following problems, answer the output message of the code, unless they are spec…
http://www.cplusplus.com/reference/algorithm/for_each/ template<class InputIterator, class Function> Function for_each(InputIterator first, InputIterator last, Function fn) { while (first!=last) { fn (*first); ++first; } return fn; // or, since C++1…
Link: Rvalue References and Perfect Forwarding in C++0x (https://www.justsoftwaresolutions.co.uk/cplusplus/rvalue_references_and_perfect_forwarding.html) 摘要: std::forward is designed for use in a template function which takes its arguments by T&&,…
Template是编译时多态.所有的模板都是在编译时产生对应的代码,它没有面向对象中的虚表,无法实现动态多态. Function Template A function template is a prescription for the compiler to generate particular instances of a function varying by type. ”变量类型“的部分放在一块,与“变量类型无关”的部分放在另一边. 放在"头文件“中,声明和实现建议这么做.其他方式…
c++的操蛋属性:自己为一档,空一档,其他随意. UB_stack a; UB_stack b = a; // copy auto c = a; auto d {a}; // (or auto d = {a}), deduced type is std::initializer_list 这是一个抓狂的问题,详见:http://scottmeyers.blogspot.com.au/2014/03/if-braced-initializers-have-no-type-why.html 今日一乐…