为“FileCase”指定的存储类错误
我尝试编译一些代码,但收到错误
storage class specified for 'FileCase'
此错误是什么意思?
这是否与我在头文件的私有部分将其声明为 extern int 有关?
我无法解决这个问题。在 cpp 文件中,我已将其声明为
int FileCase =0;
需要它的函数内部,但它不能解决问题。有谁知道问题可能是什么?
谢谢吉斯
I tried to compile some code however am getting the error
storage class specified for 'FileCase'
What does this error mean?
Does it have to do with the fact I have declared it as an extern int in the private part of the header file ?
I am unable to resolve the issue. In the cpp file, I have declared it as
int FileCase =0;
inside of the function where it is needed however it does not resolve the problem. Does anyone know what the issue could be?
Thanks
Jis
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在 .h 文件中,您应该有:
extern int FileCase;
但不在类中...并且在 cpp 文件中,您应该有一个全局变量:
int FileCase =initializer;
代码>in the .h file you should have:
extern int FileCase;
but not in a class...and in the cpp file you should have a global variable:
int FileCase = initializer;