A single backslash signifies escape to use a backslash in a literal you must use two backslashes:
Code:fp = fopen("D:\\junk.txt", "w+");Actually that could be a valid file name in a Windows command shell as well.I am unaware of any file system where "D:junk.txt" is a valid filename. (EDIT: What am I thinking? It is valid on linux; don't know why I thought colon was a reserved character. However, I suspect you're not on a *nix system, so you will need a slash or two.)
Jim