Advertisement
Guest User

Problems with default =

a guest
Nov 25th, 2012
281
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.33 KB | None | 0 0
  1. class Vector3
  2. {
  3.     float           _x;
  4.     float           _y;
  5.     float           _z;
  6.  
  7. public :
  8.  /// constructors and stuff
  9.  
  10. }
  11.  
  12. class Point : public Vector3
  13. {
  14. // some BS
  15.     Point(float _x):Vector3(float _x)
  16.     {}
  17. }
  18.  
  19. main()
  20. {
  21.     Point aPoint(3);
  22.     Point anotherPoint(4);
  23.    
  24.     // WHY DOES THIS WORK and copy _x,_y & _z properly
  25.     aPoint = anotherPoint;
  26.    
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement