string in C++
In C++, string is an object of std::string class that represents sequence of characters. We can perform many operations on strings such as concatenation, comparison, conversion etc. A simple example of C++ string. ``` #include <iostream> using namespace std; int main () { string s1 = "Hello"; char ch[] = { 'C', '+', '+' }; string s2 = string (ch); cout << s1 << endl; cout << s2 << endl; } ``` Output: ``` Hello C++ ```