Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Vector3
- {
- float _x;
- float _y;
- float _z;
- public :
- /// constructors and stuff
- }
- class Point : public Vector3
- {
- // some BS
- Point(float _x):Vector3(float _x)
- {}
- }
- main()
- {
- Point aPoint(3);
- Point anotherPoint(4);
- // WHY DOES THIS WORK and copy _x,_y & _z properly
- aPoint = anotherPoint;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement