#include <iostream>
#include <fstream>
using namespace std;
struct list{
char course[15];
int score;
};
int main(){
list list2[2];
ifstream in("f4.dat",ios::binary);
if(!in)
{
cout<<"Cannot open input file.
";
return 1;
}
for(int i=0;i<2;i++)
{
in.read((char*)&list2[i],sizeof(list2[i]));
cout<<list2[i].course<<" "<<list2[i].score<<endl;
}
in.close();
return 0;
}