Here is some code:

#include <iostream> #include <cstdlib> #include <math.h> using namespace std; class point //the "point" class { public: float x,y; }; float dis(point a, point B)/>/> //function for calculating the distance between 2 points { return sqrt(pow(a.x-b.x,2)+pow(a.y-b.y,2)) } main() { point a,b,c,d; cin >> a.x >> a.y; cin >> b.x >> b.y; cin >> c.x >> c.y; cin >> d.x >> d.y; /*code to determine if d is inside the triangle formed by a,b and c (which i have no idea how to do without copying th heavy math found on forums)*/ }