Quote Originally Posted by wysota View Post
"Alarm *v_Alarm2[]" is equivalent to "Alarm **v_Alarm2". It doesn't allocate any space for the data. If you start writing data to such array you risk overwriting critical areas of the memory (the stack frame) which can cause a crash when data that used to occupy the overwritten area of memory is tried to be accessed. I don't know if this is the case here but it might be.

As for using C-style arrays vs C++ vectors... "Alarm *v_Alarm2[]" is a C construction, not a C++ one. However all things you can do with a C array, you can do with a vector as well (apart from overwriting data that shouldn't be overwritten).
Hello wysota,

in fact the compiler, some times (depending on how I arranged things), did called the v_Alarm2[] as being **v_Alarm2 as you noticed. But in any case, how should I, than, create a vector of pointers and than create pointers to an object and store those pointers in the vector? That is what I pretend to do.

Thanks,


Momergil