I have a project creating a cartesian point, then a line segment, then a line comparison. Each has its own class .h and .cpp file. Main just starts the program to CartesianPoint test, in the point class. My question is after I create an instance of the point class and create a point, say P1, how can I then pass this object, (an instance of the point class) to the LineSegment class, to find slope and such. Line inherits LineSegment which inherits CartesianPoint. I have no idea what I'm doing.

Thanks

I have no idea what I'm doing.

And we can't your actual code. Try posting it within code tags.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.