04 2017 档案
QT 下 QUdpSocket 加入指定源组播(SSM)的方法
摘要:QT下的类 QUdpSocket 仅提供了加入组播的功能 joinMulticastGroup,却没有提供加入SSM的功能。分析了一下QUdpSocket的源码,发现joinMulticastGroup仅是socket函数 setsocketoption的一个简单封装,隐藏了不同系统下实现的不同。于 阅读全文
posted @ 2017-04-15 10:16 五星 阅读(9445) 评论(1) 推荐(0)
C++ 获取当前时间的两种方法(精确到毫秒)
摘要:1. boost 方法 2. 标准库方法 3. chrono 阅读全文
posted @ 2017-04-10 00:33 五星 阅读(13089) 评论(0) 推荐(0)
C++ 中几种格式化字符串的方法
摘要:C++ 中几种格式化字符串的方法 1. sprintfC语言中的用法 2. string 序列化include <sstream> std::ostringstream ostr; ostr << "result:"<< hex <<setprecision(3) << n1 << "+" << n 阅读全文
posted @ 2017-04-08 18:43 五星 阅读(2229) 评论(0) 推荐(0)
C++ 笔记
摘要:#include <boost/timer.hpp> #include <boost/tokenizer.hpp> #include <boost/format.hpp> #include <boost/any.hpp> #include <boost/lexical_cast.hpp> #incl 阅读全文
posted @ 2017-04-08 11:50 五星 阅读(175) 评论(0) 推荐(0)
在win7下安装 QT5.8 过程
摘要:在win7下安装QT5.8时,报“api-ms-win-crt-runtime-l1-1-0.dll” 缺失 在网上查了一下,解决步骤: 1. 安装win7 sp1补丁。 2. 安装MSU的KB2999226补丁 。 含“api-ms-win-crt-runtime-l1-1-0.dll” 安装 K 阅读全文
posted @ 2017-04-05 09:46 五星 阅读(611) 评论(0) 推荐(0)