This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: extern declaration
- From: Falk Hueffner <falk dot hueffner at student dot uni-tuebingen dot de>
- To: thomas joseph <thomascanny at yahoo dot co dot nz>
- Cc: gcc at gcc dot gnu dot org
- Date: 12 Feb 2002 15:36:21 +0100
- Subject: Re: extern declaration
- References: <20020212142359.17407.qmail@web14706.mail.yahoo.com>
thomas joseph <thomascanny@yahoo.co.nz> writes:
> Hi All,
> I have a small question about extern declaration,
> which I found it strange.
>
> test.c
>
> int a[10][10]
>
> /* some code */
>
> test1.c
>
> extern int **a;
>
> int main ()
> {
> int i = a[1][2]; // Problem here.
>
> return 0;
>
> }
>
> So, when I compile gcc -o test test.c test1.c
> It compiles properly.When I run test it crashes.
Please read the C FAQ at http://www.eskimo.com/~scs/C-faq/s6.html.
Falk