This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Initialization of arrays (newbie)
- From: "Steve Dondley" <s at dondley dot com>
- To: <gcc-help at gcc dot gnu dot org>
- Date: Sun, 25 Aug 2002 11:12:57 -0400
- Subject: Initialization of arrays (newbie)
I've read on the net that a declaration such as
int a[100];
results in all the elements of the array getting initialized to 0.
However, this doesn't appear to be the case with gcc. I have to use a for
loop and manually set each element to zero. There must be a better way.
What is it?