pghsteelers
Technical User
Using C++ stating your prototype such as:
<type> functionname(type arg1, type arg2....)
My question is, if you are passing two variables one of type float and one of type int, and you want to pass them both back, what do you specify as the "return type"? Or can you not do that?
float myfunction(float n, int t)
{
...
...
...
return n, t
}
is this possible?
what about one like
int myfunction(char a, int n)
Basically, can you return multiple type variables from a function? I know you can pass multiple types.
<type> functionname(type arg1, type arg2....)
My question is, if you are passing two variables one of type float and one of type int, and you want to pass them both back, what do you specify as the "return type"? Or can you not do that?
float myfunction(float n, int t)
{
...
...
...
return n, t
}
is this possible?
what about one like
int myfunction(char a, int n)
Basically, can you return multiple type variables from a function? I know you can pass multiple types.