cout
#include
#include
using namespace std;
The class String {
Public:
String (String STR)
: _str (STR)
{
cout<" Sting () "& lt;
String operator=(const String & amp; Str2) {
Return a String (_str=str2. _str); }
Void the display () const {
cout<_str & lt;
Private:
String _str;
};
Int main () {
String s1 (" hello ");
String s2 (" world ");
cout<" Before phrase "& lt;
cout<" After overload "& lt;