Hi,tried to define the size of an array by doing this:
and I keep getting these errors:Code:int x=2; int y=3; int z=x*y; int someArray[z];
In the programme itself x and y would be defined by user input and the size of someArray could be anywhere from 1 to 80.All errors go when i set someArray[80].Code:error C2057: expected constant expression error C2466: cannot allocate an array of constant size 0 error C2133: 'someArray' : unknown size
Im more curious as to why it doesnt work than anything else,
thanks