CString str = "hello"; str.AppendChar('!');
CStringA str = "world"; str.AppendChar('!');
CStringW str = L"unicode"; str.AppendChar(L'!');In this example, we are using the wide-character version of CString, CStringW. The value of 'str' after appending the character '!' would be "unicode!". These methods are part of the MFC (Microsoft Foundation Classes) library for C++.