<p>I'm wondering how you can implement a program similar to <code>tail -f</code> in C/C++, a program that watches for and processes new lines added to a log file?</p>

See here
You could either call out to tail and retrieve the stream back into your app, or as it's open source, maybe try to pull it into your own code.
Also, it is possible in C++ iostream to open a file for viewing only and just read to the end, while buffering the last 10-20 lines, then output that.