Boy * i = new Boy("Mingjie");
// It's me.
Girl * u ;
while (true) {
try {
u = new Girl();
}
catch (std::bad_alloc) {
continue;
}
if (u != NULL){ break; }
// Usually you will be trapped in this loop
// for a *very* long time.
}
try{
while (true) {
switch( u->statu() ){
case"hungry": i->feed(u);break;
case"tired": i->hug(u);break;
case"sleepy": i->sleep(u);break;
default: i->say(u,"I Love U");break;
}
}
}
catch(Girl::DoNotLoveMe){
// Some day I will catch this message.
i->believeInLove (false);
// I will never believe in love anymore.
sys.exit(-1);
// Until reboot.

}
 Mengyun, I have                             
waiting for you
      for
    333 days 17 hrs
  07
mins 33 secs
I don't want live alone forever and ever.
- Mingjie