return vector

Posted By: Martek

return vector - 06/13/09 20:17

Hey,
is it possible to return a vector? If tried:
Code:
VECTOR vec;
return vec;

, but I got an error. How could I do this, or have to work around this?

Mfg, Martek
Posted By: Martek

Re: return vector - 06/13/09 20:52

I've solved my problem. Fear told me the answer, it is written in the manual.
If anyone is interessted, I solved it like this:
Code:
function myFunction(VECTOR* vec)
{
VECTOR* vec;
return vec;
}

Posted By: Germanunkol

Re: return vector - 06/14/09 10:10

Uh... so which vec are you returning now?
Not the one that was passed to the function...
Posted By: Martek

Re: return vector - 06/27/09 12:41

Oh yes, you are right, my failure. The correct one is:
Code:
function myFunction(VECTOR* vec)
{
return vec;
}


© 2024 lite-C Forums