开发者

external integer constant

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜