Introduction - If you have any usage issues, please Google them yourself
1. Write a string class CTString, design style is as follows:
Class CTString
{
Char* m_pData // Used to save the character data
Int m_nLen // record character length
Public:
// Constructors and destructors
CTString ()
CTString (char*)
CTString (const CTString &)
~ CTString ()
// Other member functions
CTString* Copy (CTString*, CTString*) // copy
CTString* Connect (CTString*, CTString*) // Connect
Char* Find (CTString*, CTString*) // find sub-string
Char* Find (CTString*, char) // Find characters
Void Print () // Print the contents of the string
...// Students to expand their membership function
}
Require students to achieve the functions of the above member function, the ability of students can expand their own class function (member function).
2. Write constructors and destructors
Requires the use of new and delete application memory space and the release of space, and pay attention to the problem of memory leak (space applications do not r