Mail Archives: djgpp/1996/09/04/13:41:28
Date: Wed, 04 Sep 1996 17:33:15 +0000
From: "x DOT pons AT cc DOT uab DOT es" <ILGES AT cc DOT uab DOT es>
In a multi-source project I have a global array, declared as:
char my_global_array[256];
in one of the modules.
Which is the best way of declaring it on the other modules?
extern char my_global_array[256];
extern char *my_global_array;
extern char my_global_array[];
extern char my_global_array[256];
Extern declarations MUST exactly match the corresponding global definition,
with the exception of any initializer clause.
The variable my_global_array is NOT a pointer it is an array and you cannot
declare an undimensioned array except as an automatic argument, so....
--
Art S. Kagel, kagel AT quasar DOT bloomberg DOT com
A proverb is no proverb to you 'till life has illustrated it. -- John Keats
- Raw text -