title: Implement "tail -f" in C++
body: <p>I want to create a small code in C++ with the same functionality as "tail-f": watch for new lines in a text file and show them in the standard output.</p>
  
  <p>The idea is to have a thread that monitors the file</p>
  
  <p>Is there an easy way to do it without opening and closing the file each time?</p>