This is function within a loop in the main. The loop may use the function several times. I would like it to reset the arrays names and numbers prior to running the while loop in this function, but I am not sure how to do that. Is there a way to send it as a parameter that resets it. Any ideas?
There is no need to reset arrays because each element will be overwritten. Also it is not clear what initial value shall be assigned to the elements. Let assume that names and numbers shall be empty, then you can use standard algorithm std::fill_n (or std::fill) to reset your arrays. But the problem is that you do not pass to your function the sizes of the arrays. I think you shall to change your function such a way that parameter count would contain size of the arrays.