So here's a link for the same question but the best answer doesn't explain it fully:
Rotate Sprite to Mouse Position
It's the cross product that I'm stuck with, since the formula in that link can only be applied in mathematics outside of computing.
What is the actual formula to calculate the cross product in computing form? If you can post it as C++ code that would be great.
Keep in mind I'm looking for the cross product between 2 2D vectors, not 3D.