sizeof(PosColor) will return the size of the pointer. This is because when you pass an array into a function, it will decay into a pointer. I would recommend you to use std::vector<> or std::array<> instead of raw arrays. This generally is better practice as it doesn't require you to watch out for pointers, deallocation, and you can resize an std::vector.
To determine which one to choose:
-When the number of elements is fixed, you can use std::array
-When you have a variable number of elements, use std::vector
Again, I can't stress it enough: Always try to use std::array or std::vector instead of raw arrays, it will save you alot of frustration
thank you so much for all... yes i did the new change and works like a charm... thank you so much....
and i don't need convert the code from an array to vector.... but for get the void*, we must use the data() member. and the size() member give me the number of elements on vector.
thank you so much for all