I would like to give values to a vector/array within a struct. Something like following. However, following code gives errors, and cannot compile.
struct Params
{
float a = 1.132;
vector<float> v(100);
for (int n = 0; n < 100; ++n)
{
v[n] = n*a;
}
};
How do I fill v with value I'd like to fill, and save v in the struct? Thanks.