#include<iostream>
    #include<string.h>
    using namespace std;
class MyString
{
private:
    char *m_pchString;
    int m_nLength;
public:
    MyString(const char *pchString="")          // explain this
    {
        m_nLength = strlen(pchString) + 1;
        m_pchString = new char[m_nLength];       // explain this
        strncpy(m_pchString, pchString, m_nLength);
        m_pchString[m_nLength-1] = '\0';
    }
    ~MyString()  
    {
        delete[] m_pchString;
        m_pchString = 0;
    }
    char* GetString() { return m_pchString; }    // explain this
    int GetLength() { return m_nLength; }
};
 int main()
 {
   MyString cMyName("Alex");
   cout << "My name is: " << cMyName.GetString() << endl;
   return 0;
 }
why is new operator used in this....i understood most of it but i am confused why a char pointer is allocated an array using new operator....? this is a C++ code.....
 
     
    