<<< Reference to a member | Index | The need for a copy constructor >>> |
Consider:
#include "point.h" void draw_segment( Point from, Point to ) { /* Connect two points */ } int main() { Point pt1( 5, 15 ); Point pt2( 10, 20 ); draw_segment( pt1, pt2 ); return 0; }
What should happen when objects are passed as parameters?
Again, we want to be able to control the semantics
<<< Reference to a member | Index | The need for a copy constructor >>> |