it's very strange to cast ```Point``` to ```int *```. In this case it works, but I believe you should replace ```Point p1, p2, etc``` by ```int p1[2], p2[2], etc```