C++ Copy Constructor, Assignment Operator, Default Constructor
     C++ is pretty complex programming language out there. There are C99, C++11, C++14 and C++17 
     I'm still struggle to understand the difference amount of them. 
     Many new features are added in recent years such as functional style programming 
     and memory management. But Copy Constructor, Assignment Operator and Default Constructor 
     are very confusing concept for beginner
            // /Users/cat/myfile/bitbucket/cpp/default_constructor.cpp
            class MyStuff {
                MyStuff() {
                    pl("call Empty Constructor");
                MyStuff(const MyStuff& other) {
                    pl("call Copy Constructor");
                MyStuff& operator=(const MyStuff& rhs) {
                    pl("call Assignment Operator");
                    return *this;
            MyStuff fun(MyStuff stuff) {
                MyStuff s = stuff;
                return s;

            int main() {
                MyStuff a;      // Call Empty Constructor
                MyStuff b = a;  // Call Copy Constructor
                a = b;          // Call Assignment Operator

            // function passing by value, call "Copy Constructor"

            // function return by value, call "Copy Constructor"