Mail Archives: djgpp/1997/10/08/11:18:34
On Wed, 8 Oct 1997, Peter Berdeklis wrote:
> If you include the header file in the source file that defines the array,
> then the compiler will complain about a redefinition of the array only if
> the type or size of the array is different. If the type and size of the
> extern declaration and the definition are the same there will be no
> complaint.
Maybe I misunderstood what was Victor's problem; if so, I apologize.
I thought Victor was asking how could he avoid putting that array
dimension in two different places. If the dimension is only in one place,
he doesn't have to worry about two potentially different numbers. So I
suggested to only use the actual dimension once.
OTOH, your suggestion still requires to write the dimension twice, so the
possibility of error still exists, even though the compiler might catch
it.
- Raw text -