
C++
但行技术
这个作者很懒,什么都没留下…
展开
-
CJSON 解析JSON示例
cJSON仅有一个.h文件和.c文件组成的JSON解析器,源码可网上搜索下载。cjson解析示例原创 2023-01-15 11:39:33 · 1978 阅读 · 0 评论 -
c++ 随记:bitset测试
std::bitset测试原创 2022-12-12 09:49:05 · 189 阅读 · 0 评论 -
c++11随记:容器遍历方法,for_each遍历,for区间遍历
c++11,for_each遍历,仿函数,自动推导原创 2022-12-08 14:15:42 · 998 阅读 · 0 评论 -
C++11使用using定义别名(替代typedef)
C++11使用using定义别名(替代typedef)详细见例子:#include <QDebug>#include <map>#include <string>#include <list>int _callBack(){ printf("call back print\n"); return 0;}template <typename T1,typename T2>int _add(T1 t1,T2 t2原创 2020-07-02 00:02:16 · 833 阅读 · 0 评论 -
std::bind1st及std::bind2nd
std::bind1st 和 std::bind2nd将二元函数转换为一元函数#include <algorithm>#include <iostream>#include <vector>int main(){ std::vector<int> vec; for(int i = 0;i < 10;i++){ ...原创 2018-10-05 00:12:23 · 749 阅读 · 0 评论