// include the required header file #includeIn this example, the function CString Find is used to search for the substring "World" within a CString object named str. The function returns the index at which the substring is found, or -1 if it is not found. The package library for this function is ATL (Active Template Library), which is a library provided by Microsoft for developing COM (Component Object Model) based applications.int main() { // create a CString object CString str = "Hello World"; // search for the substring "World" in the CString object int index = str.Find("World"); // print the index at which the substring was found if(index != -1) printf("Substring found at index %d.", index); else printf("Substring not found."); return 0; }