sizing an array with a variable

it looks like I can't set the size of an array using a variable, example this code does not work

int qtyOutputs = 3;
float outPuts[qtyOutputs];

but this code does

int qtyOutputs = 3;
float outPuts[3];

is this a bug in arduino, an error I am making, or a feature I don't understand? thanks for any help. I could probably use define but that is always scary. easy to mess something up there.

it looks like I can’t set the size of an array using a variable

Depends on where you try to do it.

example this code does not work

If the array is global, the variable needs to be const.

is this a bug in arduino

No.

an error I am making, or a feature I don’t understand?

It’s one or the other.