another tip for getting rid of the chance to have ".txt" on the end, is to do the following.
in name box: enter "program.cpp" wihtout quotes.
below, where it says "text files .txt" change to "all Files"

but of course, the quotes may be easier