linux上可以使用endian.h
,但是windows没有。
解决方法是使用boost,可移植性强。
¶ 安装
¶ debian系列
sudo apt install -y libboost-dev |
¶ 使用
看文档:https://www.boost.org/doc/libs/1_61_0/libs/endian/doc/conversion.html
¶ 示例
|
1 |
linux上可以使用endian.h
,但是windows没有。
解决方法是使用boost,可移植性强。
sudo apt install -y libboost-dev |
看文档:https://www.boost.org/doc/libs/1_61_0/libs/endian/doc/conversion.html
#include <iostream> |
1 |
Except as otherwise noted, this blog is licensed under CC BY-SA 4.0 License.
©2021-
searchstar
|
pv
|
uv
Theme Tree
by Wu Jun
Powered by Hexo