X-Spam-Check-By: sourceware.org X-YMail-OSG: idCFK9oVM1mVYOIFZGWWPoVmwcN4bXbgYlxoAvRM_.HnowqZC1BVs3wXArHlKKvrtZyq2eC1WorvrvK3A1QnGu7tcPsoVJyS2gXBiJs4EcEEgqlqF3zC9gSDyJmloY0DpHfkNB667GVu1eA- X-Mailer: YahooMailRC/368.7 YahooMailWebService/0.6.132.7 Date: Fri, 9 Feb 2007 13:12:22 -0800 (PST) From: winner wei Subject: just failing to open a file at specified location/directory To: cygwin AT cygwin DOT com MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Message-ID: <302106.31853.qm@web32409.mail.mud.yahoo.com> X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id l19LCXKM018332 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/