0

What's a fast way to fill a union/struct of integral members with ALL Zeroes?

```
RECORD* UNION = {0};
void ZeroStruct(int X, int Y)
{
UNION = new RECORD[X * Y];
int K = 0;
for (int I = 0; I < X; I++)
for (int J = 0; J < Y; J++)
{
UNION[K].X = 0;
UNION[K].Y = 0;
UNION[K].Z = 0;
UNION[K].Magnitude = 0;
UNION[K].Direction = 0;
UNION[K].Angle = 0;
++K;
}
}
```

It's not slow but I want to know what's a faster way as depending on user input, X and Y can be very large and this method may or may not take long. Also with this method, I have to set each member of the union to 0.

*Edited
by triumphost*