Perhaps you can show me where in the original post there is any mention of needing to search for a particular character
pattern? I'd gladly rescind my earlier post if you can. From what I can tell, the program simply needs to print out the data in a file.
Also, if speed isn't an issue or a requirement, I doubt saving those extra micro or milliseconds is worth it, especially if the individual is just learning how to use the I/O API. Cutting and pasting your code may work, but there is no learning involved.
Perhaps Svend might like to elaborate on the needs of the program.
So as Ernest nicely stated, Ouaknin, refrain from insulting the volunteers who are here to help people learn, or anyone else on this site for that matter. I'm sure you will have plenty of opportunities to contribute your technical prowess in the forums, would hate to have that privilege (and it is a privilege, mind you) revoked simply because you can't play nice.