question 1 :Code:
ifstream fin( "file.dat") ;
while(fin) // end of file checking
// do something
fin is a object. it is not a boolean variable . so how can i use this to check end of file ?
what are other ways i can check end of file ?