C++ bitwise copy of object failing? Why?
问题 This question is regarding bitwise copying of class objects. Why is constructor not called, instead destructor is called in below code ? The output is as HowMany h2 = f(h); // No constructor get;s called here.. after construction of h: objectCount = 1 x argument inside f(): objectCount = 1 ~HowMany(): objectCount = 0 after call to f(): objectCount = 0 ~HowMany(): objectCount = -1 ~HowMany(): objectCount = -2 class HowMany { static int objectCount; public: HowMany() { objectCount++; } static