How would I return an array. Nothing gets passed through this code when I run it, I ran it using strings and it works, but will not with arrays. I am a beginner, so bare with me please if this is a stupid question.
Functions may not have return type of an array (though they may return a reference to an array).
You have two approches. Either you dynamically allocate the array and return the pointer. Or you declare the array as a parameter of the function and pass to it already created array.