that code still doesn't compile, missing brace before function
gfopen. the problem is with cfopen, i'm sorry to say that the code
for that function is so restrictive, it's really shoddy work, and i
know that's not your fault, you didn't write it. i would take it up
with whoever did write it, because the only way i can get your
program to work is by calling cfopen with "w" instead, AND that
the destination file exists already. as it stands now, cfopen just
won't cut it.

also if its skipping over the part where it's supposed to read in
a file name (this didn't happen for me but i'm on a different
compiler), you'll need to flush the input buffer.

http://faq.cprogramming.com/cgi-bin/...&id=1043284392