Thanks. I didnt think to use a matrix like that, so that i dont have to reference every solution individually, i can reference by number (which is sortof what i was looking for to begin with). I wouldn't need getSolution as a function, would I? Since it would only be called once in the program (or atleast only typed once)?
Use the function. It's modular and better programming practice.
Unless it has something to do with static?
Nope.
When used with a variable in a function, each time the function is entered the variable retains the value from the last time the function was used.
Is it possible to return an array in a function, or only its pointer?
Pointer...
And I still would like to know (even though i have no immediate need now) if its possible to store an array with {1,3,6,2....} while not initialising it.
Not a clue what you are asking. In order to get the values in the array it must be initialized somehow.
Reputation Points: 3278
Solved Threads: 894
Posting Sage
Offline 7,738 posts
since May 2006