Hello all,

I am kinda new at C++ programming. But I know some of the basics. I am trying to make a simple program that uses the point of line structure to caculate the midpoint of a given line. As much as this challenge may seem easy for most of you, I am having trouble finding ways to print it.

I know, if I use (x1 + x2 / 2) & (y1 + y2 / 2) for the points of the line when asked by the user, but to calculate the line and output of the coordinates of the midpoint is my problem.

PLEASE HELP!!! AHHHHH!!!!!!!
THIS PROGRAM IS MAKING ME GO CRAZY!!!

//------------------------------------------
line horizontal_line;

horizontal_line.p1.x = ???;
horizontal_line.p1.y = ???;
horizontal_line.p2.x = ???;
horizontal_line.p2.y = ???;
m = the_slope(horizontal_line);

//umm now what?