Checked in the wrong main.cpp last time.  This is the one from the article.