Boy * i = new Boy("BlahGeek");
// 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.
}
// 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.
}
Girls, I have
waiting for you
for
waiting for you
for
333 days 17 hrs
07 mins 33 secs
07 mins 33 secs
Live alone forever and ever.
- BlahGeek