This is the mail archive of the
cygwin
mailing list for the Cygwin project.
just failing to open a file at specified location/directory
- From: winner wei <blueleaf4tg at yahoo dot com>
- To: cygwin at cygwin dot com
- Date: Fri, 9 Feb 2007 13:12:22 -0800 (PST)
- Subject: 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/