So I have a homework problem that requires me to rewrite a function that uses reference variables as parameters into one that uses pointers as parameters instead. Here's the code:
1 2 3 4 5 6 7
int doSomething(int &x, int &y)
{
int temp = x;
x = y * 10;
y = tmep * 10;
return x + y;
}
Where do I begin? And what are the actual steps for converting them in other cases?