just failing to open a file at specified location/directory

winner wei blueleaf4tg@yahoo.com
Fri Feb 9 21:12:00 GMT 2007


Hi,

when I wanted to open a file at a specified directory for writing, running it in Cygwin, the opening just failed. It is extremely simple, like this:

if((fp=fopen("C:\cygdrive\c\home\user\data\filename", "w"))==NULL)
{
handling exception...
}

I also tried a few other ways for the pathname, like C:\home\user\data\filename; C:/cygdrive/c/home/user/data/filename; no one works. It only worked when just used a bare name without any pathname before it, but not the location as you hoped.

Any one can give some help? Thanks a lot!!!

David


 
____________________________________________________________________________________
TV dinner still cooling? 
Check out "Tonight's Picks" on Yahoo! TV.
http://tv.yahoo.com/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list