Initialising everything in an array as 0
I want to initialise everything as zero, however my array is declared like this:
where x is a non zero positive int, but I get the error message:
58 C:\Documents and Settings\jb\My Documents\a.c variable-sized object may not be initialized
58 C:\Documents and Settings\jb\My Documents\a.c [Warning] excess elements in array initializer
58 C:\Documents and Settings\jb\My Documents\a.c [Warning] (near initialization for `test')
However when i declare it using:
it works fine, any ideas?
Thanks