我正在用 C++ 构建一个项目,但遇到了一些标准库问题。
当我使用 uint_t
系列类型时,编译器显示一条错误消息。
例如,当我声明一个 uint_8
类型的变量时,它在 vim 中显示错误
uint8_t in namespace std does not name a type
有人知道这个问题吗?? (当然我包括了cstdint
)
我尝试了 C 库的 stdint.h
并且它有效。
(虽然我实际上想使用标准的 C++ 库)
此外,问题是我对其他 C++ 标准类(例如数组)也有同样的问题
我使用的是 g++ 4.8.2 版
最佳答案
<cstdint>
的支持和 <array>
自 C++11 起添加,添加标志 -std=c++11
到 g++,它会编译。
关于c++ - C++ 中的 cstdint 未定义 uint_t 系列,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21963924/