Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

external integer constant

Tags:

objective-c

this is working fine but it does produce 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

like image 335
johnbakers Avatar asked Aug 17 '11 19:08

johnbakers


1 Answers

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. :)

like image 83
Jonathan Grynspan Avatar answered Nov 05 '22 12:11

Jonathan Grynspan