c/c++: uint8_t & uint16_t & int32_t etc.

来源:互联网 发布:大数据 消费者洞察 编辑:程序博客网 时间:2024/06/10 23:58

c++ 中:
不要在 c++ 代码中使用 c 的头文件,会污染全局空间:

#include <cstdint>using namespace std;  // 或者使用 std::uint16_t 等// or#include <cstdint>using std::int32_t;  

c 中:

#include <stdint.h>

see link: http://stackoverflow.com/questions/13642827/cstdint-vs-stdint-h

0 0
原创粉丝点击