Carlos Milovic
Well-known member
Hi guys
There are some times when I need to make an array with a constant length, but that depends on the image dimensions, or other parameter. For example, this:
int n = image.Width();
float vector[n];
While this compiles (and works) well under Linux, MS refuses to compile it. Most times I just avoid using standard arrays, and just create a Array<float> object, but I have I case where for compatibility issues with other libraries, I'm forced to use that kind of arrays. Do you know of other workaround, rather than using a large number?
There are some times when I need to make an array with a constant length, but that depends on the image dimensions, or other parameter. For example, this:
int n = image.Width();
float vector[n];
While this compiles (and works) well under Linux, MS refuses to compile it. Most times I just avoid using standard arrays, and just create a Array<float> object, but I have I case where for compatibility issues with other libraries, I'm forced to use that kind of arrays. Do you know of other workaround, rather than using a large number?