Hello all, i've posted this before but noone replied, so i'll ask again:
i need a function that scales all of its arguments with a constant (or does a random thing to its arguments). Then i need to update my arguments...
How can i possible do that
EG.
1 2 3 4 5 6
int scale(int a, int b, int c)
{
a *= 4;
b *= 4;
c *= 4;
}
int scale(int & a, int & b, int & c)
{
a *= 4;
b *= 4;
c *= 4;
}
for more information about passing arguments by reference (the '&' symbol) check this: http://www.cplusplus.com/doc/tutorial/functions2/
(it even has an example very similar to what you want to do)