initialize a vector in a constructor

@robtillaart Yes malloc is a solution but I prefer to avoid pointers in C++ because they increase the probability of errors. I prefer to work more with class and object. Anyway you're right