I am thinking it is a bug in wfstream ... you can use fstream instead.
Below is your code changed to fstream with a few other minor cosmetic
changes:



// win32_console.cpp : Defines the entry...