You can find out by calling gcount() on a stream immediately after you read.
ifs.read(buf, sizeof buf);
std::streamsize bytes = ifs.gcount();
You can find out by calling gcount() on a stream immediately after you read.
ifs.read(buf, sizeof buf);
std::streamsize bytes = ifs.gcount();