#include <iostream.h>

class cTestIf
 {
  private:
    char *txt;
  public:
    cTestIf(char *_txt=NULL)
     { char *tt=new char[strlen(_txt)]; strcpy(tt,_txt); txt=tt; }
    ~cTestIf() { ; }
    
   char* Text()
     { return txt; }
   
   cTestIf& NewText(char *_txt=NULL)
     { char *tt=new char[strlen(_txt)]; strcpy(tt,_txt); txt=tt; return *this; }
     
   cTestIf& operator<<(cTestIf& _tst)
     { return _tst; }
   cTestIf& operator<<(char* _txt)
     { if(1) cout << "I"; 
       else cout << "II";
       cout << _txt; return *this; }
 };

class cTestNot
 {
  private:
    char *txt;
  public:
    cTestNot(char *_txt=NULL)
     { char *tt=new char[strlen(_txt)]; strcpy(tt,_txt); txt=tt; }
    ~cTestNot() { ; }
    
   char* Text()
     { return txt; }
   
   cTestNot& NewText(char *_txt=NULL)
     { char *tt=new char[strlen(_txt)]; strcpy(tt,_txt); txt=tt; return *this; }
     
   cTestNot& operator<<(cTestNot& _tst)
     { return _tst; }
   cTestNot& operator<<(char* _txt)
     { 1?cout << "N":cout << "NN"; 
       cout << _txt; return *this; }
 };


void main()
{
 cTestIf test("Hello World!");

 test << "*" << test.Text() << "*\n";
 test << test.NewText("One Step Beyond") << "*" << test.Text() << "*\n";
 test << test.NewText("Step Two") << "*" << test.Text() << "*\n";

 cTestNot test2("Hello World!"); cout << endl;

 test2 << "*" << test2.Text() << "*\n";
 test2 << test2.NewText("One Step Beyond") << "*" << test2.Text() << "*\n";
 test2 << test2.NewText("Step Two") << "*" << test2.Text() << "*\n";
}
