Boy *i = new Boy("Sam_Chu");
// It's me.
Girl *u = NULL;
while (true) {
try {
u = new Girl();
}
catch (std::bad_alloc) {
continue;
}
if (u != NULL) { break; }
// I will be trapped in this loop
// for "centuries".
}
try {
while (true) {
switch (u->status()) {
case "hungry" : i->feed(u); break;
case "tired" : i->hug(u); break;
case "sleepy" : i->sleepWith(u); break;
default : i->say(u, "I Love U"); break;
}
}
}
catch (Girl::DoNotLoveMe) {
// Just in case. I may catch this unexception.
i->believeInLove = false;
// Then I will never believe in love again.
sys.exit(-1);
// Until i.reboot() is execute. Better not.
// 'Cause That will take a long long time.
}
Floria!
I have had met you for
    1973 days 20 hrs
   12
mins 00 secs
Try to understand the code. I know it's hard for you.
Anyway, you can turn to me if you're not willing.