我需要从文件中准确读取 32 位。我在 STL 中使用 ifstream。我能不能直接说:
int32 my_int;
std::ifstream my_stream;
my_stream.open("my_file.txt",std::ifstream::in);
if (my_stream && !my_stream.eof())
my_stream >> my_int;
...或者我是否需要以某种方式覆盖 >> 运算符才能使用 int32?我没有看到这里列出的 int32: http ://www.cplusplus.com/reference/iostream/istream/operator%3E%3E/