Lots more answers here - http://cboard.cprogramming.com/showthread.php?t=96339