1)
Recursion: see
Recursion.
(I stole it here[^])
C++
example:
string ask_that_question(Folk * pf)
{
if ( ! pf )
{
return "sorry, no cookie for you.";
}
else if ( pf->name() == "Carlo")
{
return pf->silly_answer();
}
else
{
return ask_that_question( pf->nearby_folk() );
)
}
2) Nooo, you can't find that
Googling[
^].