Is there a way to zero init an array of any type with a variable size? So what I want is to apply something like this:
int results[5] = {};
to a template like this:
T results[i] = {};
When I try this, my compiler says this: 'results' declared as array of functions of type 'T ()'
.
When I use any fixed typename I get this error: Variable-sized object may not be initialized
Also i
is a variable that is passed in when this function is called.