>>int a = 0;
You can not put that in a header file. extern variables are always declared in a *.c or *.cpp file. Put this in the header file extern int a;
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
extern s are used to "pass" variables from one sourcefile to another. Not within a single source file. Remove the extern to make the variable a global and it should work fine (with one more change I leave to you.)
WaltP
Posting Sage w/ dash of thyme
10,505 posts since May 2006
Reputation Points: 3,348
Solved Threads: 944