Get the latest tech news
Some sanity for C and C++ development on Windows
ullprogram.com/blog/2021/12/30/ A hard reality of C and C++ software development on Windows is that there has never been a good, native C or C++ standard library implementation for the platform. A standard library should abstract over the underlying host facilities in order to ease portable software development.
Before diving into the details, if you’re looking for a quick-and-easy solution for the Mingw-w64 toolchain, including w64devkit, which magically makes your C and C++ console programs behave well on Windows, I’ve put together a “library” named libwinsane. On unix-likes this doesn’t matter, but on Windows it means programs can’t read or write binary data on standard streams without calling a non-standard function. That incantation sets standard input and output in the C runtime to binary mode without the need to include a header, making it compact, simple, and self-contained.
Or read this on Hacker News