![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C++
weixin_45330671
这个作者很懒,什么都没留下…
展开
-
C++ 读出内存地址对应的float,根据float数得到对应的内存地址
方法一:直接取//根据地址得到对应float UINT uHex= 0x40000000;float fNum = *(float*)&uHex;//根据float得到对应地址float fNum = 2.00;UINT uHex= *(int*)&fNum ;方法二:共同体union HEX2FLOAT { UINT nHex; float fValue; };HEX2FLOAT hex2f;...原创 2021-11-04 10:07:30 · 1054 阅读 · 0 评论 -
创建目录和文件,往文件中追加内容
//不存在则创建目录和文件int createDirectory(std::string path){ int len = path.length(); char tmpDirPath[256] = { 0 }; for (int i = 0; i < len; i++) { tmpDirPath[i] = path[i]; if (tmpDirPath[i] == '\\' || tmpDirPath[i] == '/') ...原创 2021-08-10 10:39:49 · 125 阅读 · 0 评论