How did the output of the following code come?
<pre><code>#include &lt;iostream&gt;
#include &lt;cstring&gt;
#include &lt;conio.h&gt;
using std::cout;
using std::endl;

class CText
{
private:
char* pText;

public:
// Function to display text
void ShowIt() const
{
cout &lt;&lt; pText &lt;&lt; endl;
}

// Constructor
CText(const char* pStr="No text")
{
cout &lt;&lt; "CText constructor called." &lt;&lt; endl;
size_t len(strlen(pStr)+1);
pText = new char[len];     // Allocate space for text
strcpy_s(pText, len, pStr);     // Copy text to new memory
}

// Copy constructor definition
CText(const CText txt)
{
cout &lt;&lt; "CText copy constructor called." &lt;&lt; endl;
size_t len(strlen(txt.pText)+1);
pText = new char[len];
strcpy_s(pText, len, txt.pText);
}

// Move copy constructor definition
CText(CText&amp; txt)
{
cout &lt;&lt; "CText move copy constructor called." &lt;&lt; endl;
pText = txt.pText;
txt.pText = 0;
}

// Destructor to free memory allocated by new
~CText()
{
cout &lt;&lt; "CText destructor called." &lt;&lt; endl;     // Just to track what happens
delete[] pText;     // Free memory assigned to pointer
}

// Overloaded assignment operator for CText objects
CText operator=(const CText txt)
{
cout &lt;&lt; "CText assignment operator function called." &lt;&lt; endl;
if(this == &amp;txt)     // Check addresses, if equal
return *this;     //     return the 1st operand

delete[] pText;     // Release memory for 1st operand
size_t len(strlen(txt.pText)+1);
pText = new char[len];

// Copy 2nd operand string to 1st
strcpy_s(this-&gt;pText, len, txt.    pText);

//     return a reference to 1st operand
return *this;
}

// Overloaded assignment operator for CText objects
CText operator=(CText&amp; txt)
{
cout &lt;&lt; "CText move assignment operator function called." &lt;&lt; endl;
delete[] pText;     // Release memory for 1st operand
pText = txt.pText;
txt.pText = 0;

//     return a reference to 1st operand
return *this;
}

// Overloaded addition operator
CText operator+(const CText txt) const
{
cout &lt;&lt; "CText add operator function called." &lt;&lt; endl;
size_t len(strlen(pText) + strlen(txt.pText) + 1);
CText aText;
aText.    pText = new char[len]; 
strcpy_s(aText.pText, len, pText);
strcat_s(aText.pText, len, txt.pText);
return aText;
}
};

class CMessage
{
private:
CText text;     // Object text string

public:
// Function to display a message
void ShowIt() const
{
text.ShowIt();
}

// Overloaded addition operator
CMessage operator+(const CMessage&amp; aMess) const
{
cout &lt;&lt; "CMessage add operator function called." &lt;&lt; endl;
CMessage message;
message.text = text + aMess.text;
return message;
}

// Copy assignment operator for CMessage objects
CMessage&amp; operator=(const CMessage&amp; aMess)
{
cout &lt;&lt; "CMessage copy assignment operator function called." &lt;&lt; endl;
if(this == &amp;aMess)     // Check addresses, if equal
return *this;     //     return the 1st operand

text = aMess.text;
return *this;     //     return a reference to 1st operand
}

// Constructor definition
CMessage(const char* str = "Default message")
{
cout &lt;&lt; "CMessage constructor called." &lt;&lt; endl;
text = CText(str);
}

// Copy constructor definition
CMessage(const CMessage&amp; aMess)
{
cout &lt;&lt; "CMessage copy constructor called." &lt;&lt; endl;
text = aMess.text;
}



};

void main()
{
CMessage motto1("The devil takes care of his own. ");
getch();
}
</code></pre>

<p>Following output was printed on the screen:</p>

<pre>
CText constructor called.
CMessage constructor called.
CText constructor called.
CText move assignment operator function called.
CText destructor called.
CText destructor called.
</pre>

<p>Please tell me why was CText constructor called two times? Or why was it called the second time?</p>
