#include<iostream>
using namespace std;

class String {
  private:
    char str[80]; 	
  public:
    String(){ 
      strcpy(str, ""); 
    }
    String( char s[ ] ) { 
      strcpy(str, s); 
    }
    void display() const { 
       cout << str; 
    }
    String operator + (String ss) const {
       String temp; 
       if( strlen(str) + strlen(ss.str) < 80 ) {
           strcpy(temp.str, str); 
           strcat(temp.str, ss.str); 
       }
       else
       { cout << "\nString overflow"; exit(1); }
       return temp; 
    }
};
main(){
    String s1 = "\nHello ";
    //String s1("\nHello"); 
    String s2 = "world"; 
    //String s2("world");
    String s3; 
    s1.display();
    cout<<endl;
    s2.display();
    s3.display();
    s3 = s1 + s2; 
    s3.display(); 
    cout << endl;
    system("pause");    
}
