【发布时间】:2014-06-18 14:06:20
【问题描述】:
我想使用下面的代码从文件中读取 uint32_t 整数。 ifstream 只接受指向 char 数组的指针。是否有另一种方法可以使用类似于下面的代码来读取 uint32_t 值?
int readCount;
uint32_t buffer[SIZE];
while ( fin.read( &buffer[0], SIZE)
|| (readCount = fin.gcount()) != 0 ) {
// some code
}
【问题讨论】: