Character 10 (0xa) is the Ascii code for linefeed, which many *nix operating systems use for line terminator. It should not be part of the filename. Just strip it off. Also, such operating systems use 0 for a string terminator. It should be at the end of the filename unless the open call takes a number of characters parameter.
The solution is to take the user's reply, find character 10 and replace it with zero. Use the result as the filename to open.
wallyk
2010-04-04 21:08:26