c++
疯狂学者
独自一人,有些伤感,现在变得更成熟了,不敢去拼,不敢去博,不是再为了我自己了
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C++之map的基本操作和使用(初学时写了忘了发布)
Map是c++的一个标准容器,她提供了很好一对一的关系,在一些程序中建立一个map可以起到事半功倍的效果,总结了一些map基本简单实用的操作!1.map最基本的构造函数;mapmapstring;mapmapint;mapmapstring;mapmapchar;mapmapchar;m原创 2020-11-26 15:35:44 · 293 阅读 · 0 评论 -
c++ float类型小端转大端存储
#include #include using namespace std; typedef unsigned int UINT;typedef unsigned char UCHAR; typedef union{ float f; char c[4];}FLOAT_CONV;static float __ltobf(floa原创 2017-06-06 10:47:32 · 1329 阅读 · 0 评论 -
初学C++之字符串的拆分
#include <iostream>#include <iomanip>#include <vector>using namespace std;int main() { string sensor_info = "1504491530:51.10"; vector<std::string> v; string c = ":"; string::size_typ原创 2017-09-12 14:53:12 · 446 阅读 · 0 评论 -
初学C++时写的 浮点数保留三位小数的方法
#include <iostream>#include <iomanip>using namespace std;int main() { int alarmCount = 6, onLineCount = 11; float count = 19.0; float save = alarmCount / count; save=(int)((save*1...原创 2018-03-07 16:15:20 · 3421 阅读 · 0 评论
分享