Quote:
Originally Posted by knobby67
Hi all,
is it possible to return different types of variables from a single function. eg int floats etc?
|
The usual method (in C) would be to pass a list of parameters to the function (called a procedure in this case). These would have to be pointers to variables so the modifications within the function stick, otherwise you'll be modifying copies of the variables instead.
These parameters can be any kind of variable, including structures.
For example:
int myProc(int *i, float *f)
{
i++;
f += 3.14;
return true;
}