You replied to my post earlier. I had the C++ question on remainders. The compiler said your code was incorrect

, so I thought i would give you the orriginal question.
Here it is:
Write the definition of a function divide that takes four argumentsÂ* and returns no valueÂ*. The first two argumentsÂ* are of typeÂ* intÂ*. The last two argumentsÂ* argumentsÂ* are pointers to intÂ* and are set by the function to the quotient and remainder of dividing the first argumentÂ* by the second argumentÂ*. The function does not return a valueÂ*.
The function can be used as follows:
intÂ* numerator=42, denominator=5, quotient, remainder; divide(numerator,denominator,"ient,&remainder); /* quotient is now 8 */ /* remainder is now 2 */
I think the answer is:
void divide(int numerator,int denominator,int* quotient, int* remainder){
*(quotient=&numerator/&denominator);
*(remainder=&denominator%&numerator);
}
But, when I run i through the compiler, these three messages appear:
In function `void divide(int, int, int *, int *)':,
invalid operands `int *' and `int *' to binary `operator /',
invalid operands `int *' and `int *' to binary `operator %'
Please help :lol:
C++