|
-
May 27th, 2002, 07:38 PM
#1
Thread Starter
New Member
Problem with declaring a structure
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?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|