copy constructors question

Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved

Join Date: Aug 2008
Posts: 91
Reputation: CPPRULZ is an unknown quantity at this point 
Solved Threads: 0
CPPRULZ CPPRULZ is offline Offline
Junior Poster in Training

copy constructors question

 
0
  #1
Feb 6th, 2009
When a parameter in a function definition (for say class distance) is abc(distance a) and in the main you call this function and pass distance b, what is the relationship thereafter between distance a and b? Do there adresses become equal-if so what implications does that have in the program?
Reply With Quote Quick reply to this message  
Join Date: Mar 2008
Posts: 41
Reputation: RenjithVR is an unknown quantity at this point 
Solved Threads: 7
RenjithVR RenjithVR is offline Offline
Light Poster

Re: copy constructors question

 
0
  #2
Feb 6th, 2009
Hi CPPRULZ ,

Might be these links can give you the answers.

1) http://www.codersource.net/cpp_copy_constructors.html

2) http://www.daniweb.com/forums/thread38304.html
Reply With Quote Quick reply to this message  
Join Date: Aug 2008
Posts: 91
Reputation: CPPRULZ is an unknown quantity at this point 
Solved Threads: 0
CPPRULZ CPPRULZ is offline Offline
Junior Poster in Training

Re: copy constructors question

 
0
  #3
Feb 6th, 2009
Thanks RenjithVR , I now think I understand copy construcotrs better but just 1 more question: when you call abc(diatance b) to a (distance &c) function definition should you rather call abc(distance &b) to (distance &c)?
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC