You need to implement some functions like
double x_of(Point *p)
{
return p->x;
}
but this misses error handling of null pointers so
double x_of(Point *p)
{
return p ? p->x : 0;
}
should be correct.
And pay attention to memory managment when you allocate memory you must delete it.
Learn to use the debugger and the usage of print or TRACE for your homework.
Search for some tutorial on this language details.