The program crashes on the last loop right after J is updated to the value of one.
Why does this not work? How can J being updated to 1 impact the array?
It must have something to do with how I declared the pointers, but I can't quite figure it out..
Line 11, you're just re-assigning p_p_p_array 3 times in a row (and also created more memory leaks each time). I believe you want to be indexing [i] there. Same for line 17, it would seem.
I've got it working now with parameters and all. I was so focused on the pointers that I forgot to index! Rather ashamed I spent an hour trying to figure out something so simple , rofl. Thank you for the help Ganado.
Edit: Shawnlau, the silly pointers was me trying to figure out how to make it work