diff options
Diffstat (limited to 'euler/source/io/fread.cpp')
-rw-r--r-- | euler/source/io/fread.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/euler/source/io/fread.cpp b/euler/source/io/fread.cpp new file mode 100644 index 0000000..e2d05b6 --- /dev/null +++ b/euler/source/io/fread.cpp @@ -0,0 +1,9 @@ +#include <cstdio> + +namespace std { + + size_t fread(void *buffer, size_t size, size_t count, FILE *stream) { + return stream->try_read(buffer, size * count) ? count : 0; + } + +} |