1. Don't put all variable declarations at the top of the function. C requires it, C++ does not, and it's ugly 2. ALWAYS give any variable you create a default value, when you create it. 3. Don't use crappy C FILE handles, use iostreams 4. Don't use a file extension with a known value and use it to store something totally different. 5. Don't integrate code into your code base if you have no idea what it does. Christian Graus - Microsoft MVP - C++