On Jul 26, 2006, at 12:25 AM, Carlos wrote: > Delete that first spurious assignment to input (and don't put it > back) and you'll find the solution. Good luck. There's nothing wrong with the initial assignment in the original message. Chris Pine teaches this technique (initialize before loop, test in loop condition, and change inside the loop) throughout his book. I agree that it's not the most elegant (thus the need for the delete_if() call or similar trick), but it works just fine. You use what you learn. James Edward Gray II