reading from text file
<p>I'm writing a program which reads only integers from a text file. I have done the lions share of the program, however one thing is bothering me </p>

<p>When a non integer is in the text file, all the correct integers should be printed, with element not valid, replacing the element which is not valid. 
For example 10, 203, 2.02 10 would print 10, 203, element not valid 10 .
For this do i use an array to access the part which is not valid? </p>

<p>Any suggestions?</p>
