Câu hỏi 26497 - Kỹ thuật lập trình cơ sở - IT01
Cho biết đoạn chương trình sau thực hiện thao tác xử lí gì?
struct HocSinh{
string _tenHH;
string _gioiTinh;
float _diemTB;
};
void XULY(int &n, HocSinh ds[])
{
fstream f;
f.open("HocSinh.dat", ios::in|ios::binary);
int i=0;
while(!f.eof()){
f.read((char *)&ds[i], sizeof(HocSinh));
i++;
}
n = i-1;
f.close();
}