Passing Class Objects, Instances

Reply

Join Date: Jun 2005
Posts: 3
Reputation: Robert G is an unknown quantity at this point 
Solved Threads: 0
Robert G Robert G is offline Offline
Newbie Poster

Passing Class Objects, Instances

 
0
  #1
Jun 15th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,782
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 308
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: Passing Class Objects, Instances

 
0
  #2
Jun 15th, 2005
Originally Posted by Robert G
I have no idea what I'm doing.
And we can't your actual code. Try posting it within code tags.
“The essential notion of a socialist society is force.”
— Milton Friedman
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 1418 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2010 DaniWeb® LLC