This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

just failing to open a file at specified location/directory


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/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]