No, sorry, it is NEVER working, not with "main.exe < input file" nor with just "main.exe" and putting some text manually in (end with ^Z).... It really seems that no EOF is sent on windows stdin....? any ideas? alex