#include<iostream>
using namespace std;

class String {
  private:
    char* str; 
  public:
    String(){}     
    String(char* s)  {
      int length = strlen(s); 
      str = new char[length+1]; 
      strcpy(str, s);        
    }
    ~String() {
      cout << "Deleting str."<<endl;
      delete[ ] str; 
    }
    void display() {
      cout << str << endl;
    }
};

main() { 
  
  String s1 = "Information Technology.";
  cout << "s1="; //display string
  s1.display();
  {
     String s2;
     s2 = s1;             
  }
  cout<<"constructor"<<endl;
  s1.display();
  system("pause");
}

