musisz zwrócić to jakąś strukturą np.
std::pair <float, float>
#include <utility>
std::pair<float, float> wspolrzedne(float x1, float x2, float y1, float y2)
{
return std::pair<float, float>(x2-x1, y2-y1);
}
później możesz wyświetlić to tak:
std::pair<float, float> wsp = wspolrzedne(1,0, 2,0);
std::cout << wsp. first << ' ' << wsp.second << '\n';