#EXTERN ?
4 messages · Page 1 of 1 (latest)
When your question is answered use !solved to mark the question as resolved.
Remember to ask specific questions, provide necessary details, and reduce your question to its simplest form. For tips on how to ask a good question use !howto ask.
extern.
Without it, every c file that includes the header will have their own definition of var, causing a conflict.
Extern basically tells any file that includes it "there exists a variable call var somewhere else, use that"
tl;dr
extern int x; in the header.
int x = /*something*/; in ONE of your source files