These constructors initialize a new CString object with the specified data.
Because the constructors copy the input data into new allocated storage, you should be aware that memory exceptions may result.
Some of these constructors act as conversion functions. This allows you to substitute, for example, an LPTSTR where a CString object is expected.
Header file: | Afx.h |
Platforms: | H/PC 2.0, Palm-size PC, H/PC Pro |
Windows CE versions: | 1.0 and later |
Complete documentation: | Visual C++ documentation |
CString( );
CString( const CString& stringSrc ); throw( CMemoryException );
CString( TCHAR ch, int nRepeat = 1 ); throw( CMemoryException );
CString( LPCTSTR lpch, int nLength ); throw( CMemoryException );
CString( const unsigned char* psz ); throw( CMemoryException );
CString( LPCWSTR lpsz ); throw( CMemoryException );
CString( LPCSTR lpsz ); throw( CMemoryException );