cpp implementation of Set Matrix Zeroes