CString str = "Hello"; if (str.IsEmpty()) { // do something if the string is empty }
CString str = ""; if (str.IsEmpty()) { // do something if the string is empty }In this example, since `str` is empty, the `IsEmpty` function will return `true`. Package library: This is a member of the MFC (Microsoft Foundation Class) library, a collection of pre-built classes for developing Windows applications in C++.