0

In my code, I use std::vectors a lot. I read the size of the constainers and assign corresponding values. No push_backs are involved so std::vector gives me more than I want. I also do not want to use native C-arrays due to safety issues. Also, std::array requires size of the container in advance. I am looking for something that is very close to std::array but its size could be able to change just once as we do for native C-arrays: define a pointer and then allocate memory.

Shibli
  • 5,879
  • 13
  • 62
  • 126

0 Answers0