Why are you using a pointer to set the length of your array?
To dereference the pointer, you need to know its address, but it would be given to it only after the program have started, but the demension of the array must be the compile-time-constant.
off course :D
thanx for clarification Syuf!!