//Ex6_27.cpp
#include "iostream" 
#include "fstream" 
using namespace std;
void main() 
{int i,x;
 ifstream in("c:\\mydata.dat",ios::in|ios::binary); 
 if(!in) 
	{cout<<"can't open c:\\mydata.dat!!"<<endl; 
	 abort();} 
 in.seekg(2*sizeof(int));  //将指针定位到第3个数据
 for(i=3;i<=9 && in.read((char *)&x,sizeof(int));i+=2)
	{in.seekg(sizeof(int),ios::cur);  //指针后依1个数据
     cout<<x<<'\t';}
 cout<<endl;
 in.close();
}  
