I have some newbie question.When I trying to read data from file the last block is reading two times .The condition in loop is (!eof) What am I doing wrong???
This is my code :
Don't check eof to see if there is anything else to read. At times input functions will not find it. For example, if there is a space after the last digit. You should instead check the fail flag after the input. That is,