I assume holder is a class or a struct, so it would be helpful to see the declarations...Some of the lines look suspicious:
What is data exactly? It looks like you are trying to allocate space for a two-dimensional array, but this won't be enough to do so...If you are allocated a one-dimensional array get rid of the '*' in that:
Also, an easier way to zero out the contents of that array would be to use the memset() function.
Lastly, you will go out of bounds in your loops:
Will loop up to temp.count; unfortunately arrays start with a 0 subscript (temp.data) so you should loop like so:
for(int k = 0; k<= temp.count; k++)
for (int k=0; k<temp.count; k++)