Simple C++ reader for MNIST dataset