会员
周边
新闻
博问
闪存
众包
赞助商
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
mohist
首页
新随笔
管理
上一页
1
···
30
31
32
33
34
35
36
37
38
···
40
下一页
2020年9月13日
一些自己常用的代码集合
摘要: 持续更新: 1、c++11自己实现的 信号量 和 事件 头文件.h 1 #pragma once 2 #include <mutex> 3 #include <condition_variable> 4 #include <chrono> 5 6 7 namespace utils 8 { 9 cl
阅读全文
posted @ 2020-09-13 13:21 mohist
阅读(602)
评论(0)
推荐(0)
2020年9月12日
ubuntu下载源码clang + llvm+lldb 编译+安装
摘要: 【本文可能涉及到Ubuntu安装以下工具:】 A、g++ B、gcc C、make D、cmake E、clang(10.0.1)(必须) F、llvm(10.0.1)(必须) G、lldb(10.0.1)(可选) H、libcxx(10.0.1)(必须) I、libcxx abi(10.0.1)(
阅读全文
posted @ 2020-09-12 01:46 mohist
阅读(6331)
评论(0)
推荐(0)
2020年9月10日
cmake命令行生成32位和64位项目
摘要: 概述 本文演示环境: win10 + VS2017 1.指定变量值 咱们常用命令【cmake ..】在build目录下配置生成项目和解决方案。 其实,这个命令还有其他用法。 指定CMakeLists.txt中的变量值。比如 , fmt 库 的CMakeLists.txt中有一个变量 【BUILD_S
阅读全文
posted @ 2020-09-10 12:25 mohist
阅读(16177)
评论(1)
推荐(0)
2020年9月9日
c++11之日期和时间库
摘要: 本文主要介绍 std::chrono日期和时间用法。 演示环境: vs2017 0、头文件 1 #include <chrono> 2 #include <thread>// 如果需要使用线程 1、duration 其表示一段时间,可以是这段时间单位可以是秒、分钟、小时、微秒,可以在 这里 看到详情
阅读全文
posted @ 2020-09-09 10:38 mohist
阅读(1640)
评论(0)
推荐(0)
2020年9月8日
ffmpeg、数字音频教程、JUCE、std::tuple
摘要: 下载网易云音乐的视频 https://yunyinyue.iiilab.com/ 模板教程: https://github.com/wuye9036/CppTemplateTutorial/blob/master/ReadMe.md 1、http://www.zhangxinhao.com/myno
阅读全文
posted @ 2020-09-08 13:24 mohist
阅读(263)
评论(0)
推荐(0)
c++之元组std::tuple常见用法
摘要: 元组,c++11中引入的新的类型,可类比std::pair。 但是std::pair只能支持两个元素。 理论上, 元组支持0~任意个元素。 本文演示环境: VS2015 up3 0、头文件 #include <tuple> 1、创建和初始化 1.1、创建一个空的元组, 创建时,需要指定元组的数据类型
阅读全文
posted @ 2020-09-08 09:20 mohist
阅读(39560)
评论(1)
推荐(3)
2020年9月7日
c++之可变参数格式化字符串(c++11可变模板参数)
摘要: 本文将使用 泛型 实现可变参数。 涉及到的关见函数: std::snprintf 1、一个例子 函数声明及定义 1 // 泛型 2 template <typename... Args> 3 std::string show_str(const char *pformat, Args... args
阅读全文
posted @ 2020-09-07 22:55 mohist
阅读(4319)
评论(0)
推荐(0)
c(++)可变参数之格式化字符串
摘要: 0、序言 使用printf函数,其参数就是可变参数。下面将使用 C语言 的库函数实现可变参数的函数 。 用途(欢迎补充): A、记录日志,可能需要将变量格式化输出到日志文件。 B、格式化字符串,显示结果(A差不多)。 1、使用 A、头文件 // 使用va_start需要的头文件 #include <
阅读全文
posted @ 2020-09-07 22:30 mohist
阅读(1584)
评论(0)
推荐(0)
c(++)变长参数之整形(非字符串类型类似)
摘要: 0、序言 变长参数,接触的第一个可变长参数函数是 printf , 然后是 scanf 。他们的原型如下: printf: _Check_return_opt_ _CRT_STDIO_INLINE int __CRTDECL printf( _In_z_ _Printf_format_string_
阅读全文
posted @ 2020-09-07 21:28 mohist
阅读(358)
评论(0)
推荐(0)
2020年9月4日
c++之记一次常见数据类型在fedora和wind10下所占的长度
摘要: 包括: char , int , float, double, long ,long long , unsigned long long , long double 1、源码 #include <iostream> using namespace std; class empty_class {};
阅读全文
posted @ 2020-09-04 08:48 mohist
阅读(221)
评论(0)
推荐(0)
上一页
1
···
30
31
32
33
34
35
36
37
38
···
40
下一页
公告