int atoi( const char *string );
从 atoi 的原型 分析
CString does not have a base class.
A CString object consists of a variable-length sequence of characters. CString provides functions and operators using a syntax similar to that of Basic. Concatenation and comparison operators, together with simplified memory management, make CString objects easier to use than ordinary character arrays.
CString is based on the TCHAR data type. If the symbol _UNICODE is defined for your program, TCHAR is defined as type wchar_t, a 16-bit character type; otherwise, it is defined as char, the normal 8-bit character type. Under Unicode, then, CString objects are composed of 16-bit characters. Without Unicode, they are composed of 8-bit char type.
When not using _UNICODE, CString is enabled for multibyte character sets (MBCS, also known as double-byte character sets, DBCS). Note that for MBCS strings, CString still counts, returns, and manipulates strings based on 8-bit characters, and your application must interpret MBCS lead and trail bytes itself.
CString objects also have the following characteristics:
CString objects can grow as a result of concatenation operations.
CString objects follow “value semantics.” Think of a CString object as an actual string, not as a pointer to a string.
You can freely substitute CString objects for const char* and LPCTSTR function arguments.
A conversion operator gives direct access to the string’s characters as a read-only array of characters (a C-style string).