#include#include using namespace std; int main() { string str1 = "Hello"; string str2 = "World"; bool isEqual = str1 == str2; if (isEqual) cout << "Strings are equal." << endl; else cout << "Strings are not equal." << endl; return 0; }
#includeThis code compares two strings "Hello" and "World" using the EqualTo function of the TString class. As the two strings are not equal, the output will be "Strings are not equal." The package library used in this code is the Borland C++ Builder library, as the TString class is a part of this library.#include using namespace std; int main() { TString str1 = "Hello"; TString str2 = "World"; bool isEqual = str1.EqualTo(str2); if (isEqual) cout << "Strings are equal." << endl; else cout << "Strings are not equal." << endl; return 0; }