fork download
  1. The first one : you create a player using default CTOR on the stack,
  2. another one on the heap and then copy the one on the heap into the
  3. one on the stack.
  4.  
  5. 2nd case, you create an object on the heap and create a reference to
  6. this one on the stack. There is no copy
  7.  
  8. dzada
  9.  
  10.  
  11. Player player=Player(); uses the default+copy constructor, not
  12. default+defualt+assignment. – Mooing Duck 10 mins ago
  13.  
  14. that s what i mean, default (stack) default (heap) and copy. – dzada 6 mins ago
Not running #stdin #stdout 0s 0KB
stdin
Standard input is empty
stdout
Standard output is empty