cool. funny how i could understand what needs to happen much easier using c functions, when i was trying to do it with fstream and ending up with really jumbled up code. thanks roger.