File read question

Hi all,
I am trying to read an address from a file, but I am trying to ensure that when it comes to the zip code, only digits are entered. Is there a way to skip over a line in a file that does not contain the required input?

Example:
--Text file conatins:
Bechtol
Evan
Clay
Main Street
Dallas
Texas
LLLLL (This should be zip code in numeric digits only)
//More data below

I have my program set to where it does recognize that there is invalid data being sent, and then asks the user to manually enter that data. However, the compiler is not moving to the next line after this. It continues to get stuck on each following character of that line, until it has been read.
Read line into string variable first, then validate.
Reading should happen regardless of data correctness.
Later validation should accept or reject entered data.
Thank you! That solved my problem. C++ guru MiNiPaa
Topic archived. No new replies allowed.