c arrays: setting size dynamically?
- by user336994
Hello,
I am new to C programming. I am trying to set the size of the array using a variable but I am getting an error: Storage size of 'array' isn't constant !!
01 int bound = bound*4;
02 static GLubyte vertsArray[bound];
I have noticed that when I replace bounds (within the brackets on line 02) with the number say '20', the program would run with no problems. But I am trying to set the size of the array dynamically ...
Any ideas why I am getting this error ?
thanks much,