You are viewing a single comment's thread. Return to all comments →
Dunno why those but in fact vector is much more heavier than plain array. So there is a good point in using it instead vector. Imho.
If you don't want to use std::vector here, you can use std::array instead, not C-style arrays.
And no, std::vector is not 'much more heavier'. It depends on how you use it (i.e. if you do a lot of reallocations). In my code, there is only one allocation since I provide the size at the initialization.
Why did you use "auto"? What's it means?
I thought it was used to declare local variables, is it another use?
std::array can not be used here because the size of an std::array must be provided at compile time.