returning a matrix from a function

Mar 9, 2009 at 4:59am
Can we return a matrix from a function?
Mar 9, 2009 at 5:23am
You can, as far as I know, return whatever you want from a function.
Mar 10, 2009 at 2:01pm
can you give me the syntax..
Mar 10, 2009 at 2:23pm
What is your matrix? (multidimensional dynamic array, vector of vectors...)
Mar 10, 2009 at 3:07pm
The same as any other type

1
2
3
4
5
6
// pseudo code
some-return-type-here some-function-name-here( some-parameters-here ) {
   some-return-type-here a-variable-of-the-right-type;
   // do stuff
   return a-variable-of-the-right-type;
}
Topic archived. No new replies allowed.