c++ - 无法在 C++ 头文件中创建数组?
问题描述
我正在使用 SDL 和文件 InputPC.h 开发游戏" 为钥匙。
Class InputPC {
public:
InputPC();
~InputPC();
static void Tick();
static bool a;
static bool w;
static bool s;
static bool d;
static bool[] myarray;
static bool getA();
static bool getW();
static bool getS();
static bool getD();
};
myarray 行总是红色的,(我试过不使用静态)
解决方案
只是我将我的数组声明为
bool inputs[10];
推荐阅读
- python - 通过将整数除以范围(1,100)中的所有整数并检查结果是否产生整数来评估整数的素数时出错
- javascript - 如果整个表达式为真,javascript输出非布尔值的行为是什么
- perl - 如何从 stat() 模块转换为适当的时间
- python - Pandas str 拆分一列并将其添加到数据框中
- html - 图片不显示 img src
- json - Post Request 在 Postman 中给出 405 错误
- python - /blog/post/comment/update/18/ 处的 ModuleNotFoundError 没有名为“test-post-ecomon”的模块
- pine-script - 保持条形颜色相同,直到 pinescript 中出现另一种情况
- performance - isPascal() 方法的时间复杂度是多少
- javascript - GraphQl 突变错误结果