Is there a way in C++ to construct a float array initializing it\'s values?
For example, i do:
float* new_arr = new float[dimension]; for(unsigned int i
float* new_arr = new float[dimension]();
In this particular case (all zeroes) you can use value initialization:
Instead of explicitly using new[] you could use a std::vector<float> instead:
new[]
std::vector<float> new_vec(dimension, 0);