我可以想到一些快速读取最后128位的方法,但哪种方式最简单,最有效?
Jump to the end and read:
char buf[16];
std::ifstream infile("thefile.bin", std::ios::binary);
infile.seekg(16, std::ios::end);
if (!infile || !infile.read(buf, 16))
{
// error! Maybe die.
}
// process buf
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.