c++ file parser code fragment