【发布时间】:2025-12-15 17:55:02
【问题描述】:
我正在 Atmel Studio 7 中处理 C++ 项目。我是否必须在我的头文件/C++ 文件中包含 stdbool.h、stdint.h 或类似的 AVR-GCC 库? bool 是 C++ 中的一个关键字,但我不知道它是否适用于微控制器项目,因为并非所有 C++ 功能都受支持。 uint8_t 也不是关键字,它是 typedef。但是,如果我不包括它们,该项目就可以正常运行。 uint8_t 可以在stdint-gcc.h 中使用,它似乎默认包含在项目中。我还应该将#include <stdbool.h>、#include <stdint.h> 放入需要使用它们的文件中吗?
【问题讨论】:
标签: c++ avr-gcc atmelstudio