returning different types of variables from a function
Hi all,
is it possible to return different types of variables from a single function. eg int floats etc? |
In what language? In C, you'd have to use a tagged union or something similar to overlap the values. C99 would permit an anonymous tagged union.
|
Appologies yes C
|
Quote:
These parameters can be any kind of variable, including structures. For example: int myProc(int *i, float *f) { i++; f += 3.14; return true; } |
All times are GMT -5. The time now is 03:53 PM. |