I'm writing a program in which it would be nice to return an array from a function.
Things are working ok without such a function but for readability and "easy to reuse"
code this would be a nice thing.
Example:
Is it possible to do something like that by returning an array? or by reference maybe?Code:int function(int array[20][50]) { //read coordinates from a file.... return array; } int main() { //some stuff here int coord[20][50]; coord = function(coord); //more stuff here return 0; }
Any clues would be greatly appreciated...