shared global variables in C

Posted by Claudiu on Stack Overflow See other posts from Stack Overflow or by Claudiu
Published on 2010-06-09T23:12:57Z Indexed on 2010/06/09 23:22 UTC
Read the original article Hit count: 269

How can I create global variables that are shared in C? If I put it in a header file, then the linker complains that the variables are already defined. Is the only way to declare the variable in one of my C files and to manually put in externs at the top of all the other C files that want to use it? That sounds not ideal.

© Stack Overflow or respective owner

Related posts about c

    Related posts about variables