On Thu, Nov 6, 2008 at 7:54 AM, Tamas Marki <[EMAIL PROTECTED]> wrote:

>>> I have written a program to create a file.The file always get created
>>> in Bin folder.How to create a file in other folders of desired
>>> location.
>>> Please reply soon.
>> Where's your code? Just provide the full path to the directory you
>> want to open the file in.
>> fopen("C:\Users\bmccoy\Music\myfile.txt", "w");
>
> Sorry for the nitpick, but you forgot to escape the backslashes (and
> for newbies it could produce a not too obvious error). The correct way
> would be:
>
> fopen("C:\\Users\\bmccoy\\Music\\myfile.txt", "w");

That's required for Windows paths now? I don't do much Windows
programming these days, but don't recall having to escape the
backslashes in the past.

-- Brett
------------------------------------------------------------
"In the rhythm of music a secret is hidden;
    If I were to divulge it, it would overturn the world."
               -- Jelaleddin Rumi

Reply via email to