会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
生而为人,学无止境
博客园
首页
新随笔
联系
订阅
管理
2020年6月12日
C++ map嵌套map
摘要: 最近的项目总使用到迭代器与map,随便写个例程增加熟练度 例程介绍: 通过Type与ID查询到指定函数进行相应操作; #include <iostream> #include <vector> #include <string> #include <map> using std::string; u
阅读全文
posted @ 2020-06-12 21:03 生而为人,学无止境
阅读(4318)
评论(0)
推荐(0)
2020年6月11日
C++ map常用操作及迭代器
摘要: 1.返回迭代器 map_date.begin(); map_date.end(); map_date.find(find_date); #include <iostream> #include <vector> #include <string> #include <map> using std::
阅读全文
posted @ 2020-06-11 20:31 生而为人,学无止境
阅读(3047)
评论(0)
推荐(0)
2020年6月10日
C++ vector与string互转
摘要: 1.vector转string std::string Str = "hello world!"; std::vector<uint8_t> Vec; Vec.assign(Str.begin(), Str.end()); 2.string转vector std::string Str; std::
阅读全文
posted @ 2020-06-10 21:58 生而为人,学无止境
阅读(33014)
评论(0)
推荐(1)
2020年6月1日
Linux C++常用时间结构
摘要: timeva结构: struct timeval { time_t tv_sec; /* Seconds. */ suseconds_t tv_usec; /* Microseconds. */ }; tm结构: struct tm{ int tm_sec; /*秒,正常范围0-59, 但允许至61
阅读全文
posted @ 2020-06-01 21:59 生而为人,学无止境
阅读(292)
评论(0)
推荐(0)
2020年5月24日
linux 获取ntp客户端
摘要: NTP相关知识 一、NTP协议 NTP(Network Time Protocol),网络时间协议。 应用于分布式时间服务器和客户端之间,实现客户端和服务器之间的时间同步,从而使网络内所有设备的时间基本保持一致。NTP工作于UDP的123端口。 ①NTP报文格式 0 2 5 8 16 24 32 +
阅读全文
posted @ 2020-05-24 23:53 生而为人,学无止境
阅读(446)
评论(0)
推荐(0)
Linux C++中的时间函数(转)
摘要: 摘自:https://www.cnblogs.com/space-place/p/6253542.html asctime(将时间和日期以字符串格式表示) 相关函数 time,ctime,gmtime,localtime 表头文件 #include<time.h> 定义函数 char * ascti
阅读全文
posted @ 2020-05-24 22:42 生而为人,学无止境
阅读(757)
评论(0)
推荐(0)
2020年5月7日
ubuntu apt源收藏
摘要: 文件位置: /etc/apt/sources.list 国内源: # 阿里源deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiversedeb http://mirrors.aliyun.com/ub
阅读全文
posted @ 2020-05-07 08:16 生而为人,学无止境
阅读(178)
评论(0)
推荐(0)
公告