【发布时间】:2012-09-28 06:00:02
【问题描述】:
为了测量流的位置/偏移量/大小,标准指定了std::streampos、std::streamoff 和std::streamsize,但它们是由实现定义的。
如何以安全且可移植的方式将这些类型转换为long long int? (例如测量文件大小并将其注入以 long long int 作为参数的函数)
【问题讨论】:
标签: c++ file c++11 stream standards-compliance