Using fstream instread of FILE
cstdint to stdint