读文件

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

}

 

你可能感兴趣的:(文件)