Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
C Programming
How do I inhibit warning 528?
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Alan Balmer, post: 1698120"] Since it's declared static, it doesn't need to have extern linkage, and in fact, the uses in the two files may conflict. Apparently there's some concern that this variable have the same initial value in both of the programs where it's used, so I would do something like #define MY_SPECIAL_VALUE 3 in the header file, then each file that needs it declares static int my_const_var = MY_SPECIAL_VALUE; (Actually, I'm suspicious that this program doesn't even need a variable, but can't tell without seeing the rest of it.) [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
C Programming
How do I inhibit warning 528?
Top