Trying to make the code so that you could pass any size array into it so that anyone could make code for any size cube they wanted. So I'm using pointers. I could hardcode all the values in and originally had it that way, but I want it to be more flexible. The weird thing is that sometimes the code will start working again. So it's not getting stuck in an infinite loop somewhere, however somehow it does temporarily seize up.