Xref: news2.mv.net comp.os.msdos.djgpp:8353 From: brucef AT central DOT co DOT nz (Bruce Foley) Newsgroups: comp.os.msdos.djgpp Subject: Re: Declaring global arrays in a multisource project Date: Fri, 06 Sep 1996 09:07:38 GMT Organization: Internet Company of New Zealand Lines: 26 Message-ID: <50ou0o$btf@status.gen.nz> References: <01I937U2638O00D67E AT cc DOT uab DOT es> NNTP-Posting-Host: brucef.central.co.nz To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp "x DOT pons AT cc DOT uab DOT es" wrote: >Dear programmers, >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? I'd use this one: > extern char my_global_array[256]; > extern char *my_global_array; > extern char my_global_array[]; Also, use a #define for the array size so that if you decide to change it, you only have to do it in one place. Bruce.