How do I clear a C++ array?

std::fill_n(array, elementCount, 0);

Assuming array is a normal array (e.g. int[])

Leave a Comment