开发者

external integer constant

开发者 https://www.devze.com 2023-03-29 07:50 出处:网络
this is working fine but it does pr开发者_Python百科oduce a warning: extern int const SCREEN_WIDTH;

this is working fine but it does pr开发者_Python百科oduce a warning:

extern int const SCREEN_WIDTH;

Need I be concerned about doing this? It functions exactly as intended.

The warning I get is:

SCREEN_WIDTH initialized and declared extern

and

extern variable has an initializer


Sounds like where you set the SCREEN_WIDTH constant's value, you still have the extern keyword. Something like:

extern int const SCREEN_WIDTH = 1024;

If so, remove the extern keyword. It should only be present where you declare the constant, not where you define it. :)

0

精彩评论

暂无评论...
验证码 换一张
取 消