Here is a list of Comparison Methods − Sr.No. Sets a character at a specified position.
Returns the character at a specified position. Tests whether a CString object contains no characters. Returns the number of characters in a CString object. Sr.No.Ĭonstructs CString objects in various ways Following are some important features of CString.Ī CString object consists of a variable-length sequence of characters.ĬString provides functions and operators using a syntax similar to that of Basic.Ĭoncatenation and comparison operators, together with simplified memory management, make CString objects easier to use than ordinary character arrays. Microsoft Foundation Class (MFC) library provides a class to manipulate string called CString. Here is the simple example of character array.Ĭhar word = įollowing is another way to represent it. This string is actually a one-dimensional array of characters which is terminated by a null character '\0'.Ī null-terminated string contains the characters that comprise the string followed by a null. The C-style character string originated within the C language and continues to be supported within C++.
Strings are objects that represent sequences of characters.