Posts tagged streams

Use files

:: C++11, files, regex, streams

Chinese Lanterns

Chinese Lanterns

Recently I’ve found myself in the common situation where I have to open a file and make something with its content. This is a basic task and should present no difficulties to a programmer; I happened, however, to get stuck for a while in search of a good way to carry out this apparently simple task. In particular, I have run into the recent addition of regular expression processing to the STL. Spoiler alert: I was not particularly happy of what I’ve found along the way.