读文件

Type value;
while(inFile >> value)
{
      //loop body goes here.  
}

if(inFile.eof())
{
//terminated with EOF
}
else if(inFile.fail())
{
//terminated with mismatch
}
else
{
//terminated with some reason unknown
}

 

posted @ 2014-01-17 02:08  而远之  阅读(162)  评论(0编辑  收藏  举报