In the header file, declare the variables as "extern". For example:
extern int n;
This just says that they exist somewhere, but doesn't allocate storage for them.
Then make them exist somewhere: in exactly one source file, at file scope (not inside any function), define each variable. For example:
int n;
--efn
Main Topics
Browse All Topics





by: AxterPosted on 2004-02-22 at 16:47:05ID: 10428624
You need to add header gaurds to your header file.