You could also declare the function as taking addresses of variables:
void getdat(byte &one, byte &two)
{
one = 1;
two = 2;
}
Then, call it:
byte a=13, b=26;
getdat(a, b);
After the call, a will contain 1, and b will contain 2.
You could also declare the function as taking addresses of variables:
void getdat(byte &one, byte &two)
{
one = 1;
two = 2;
}
Then, call it:
byte a=13, b=26;
getdat(a, b);
After the call, a will contain 1, and b will contain 2.