Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!think!ames!sdcsvax!ucsdhub!hp-sdd!hplabs!sdcrdcf!trwrb!aero!venera.isi.edu!lmiller From: lmiller@venera.isi.edu.UUCP Newsgroups: comp.lang.c Subject: Re: 2 questions (Turbo C) Message-ID: <3491@venera.isi.edu> Date: Sat, 29-Aug-87 14:44:20 EDT Article-I.D.: venera.3491 Posted: Sat Aug 29 14:44:20 1987 Date-Received: Sun, 30-Aug-87 23:48:28 EDT References: <9034@brl-adm.ARPA> Reply-To: lmiller@venera.isi.edu.UUCP (Larry Miller) Organization: Information Sciences Institute, Univ. of So. California Lines: 19 In article <9034@brl-adm.ARPA> bonak%cs.uiowa.edu@RELAY.CS.NET (Esmail Bonakdarian) writes: > I am using Turbo C and have the following problem trying to open a file > in a program: > > if ( (infile = fopen("c:\temp\helpfile", "r")) == NULL ) > { fprintf(stderr, "Input file HELPFILE not found."); > exit(1); > } >always results in the error message. It seems that I can't specify >a path along with the file name. Paths in DOS include a BACKSLASH, which you need to quote with an additional backslash. Try this: if ( (infile = fopen("c:\\temp\\helpfile", "r")) == NULL ) Larry Miller USC/ISI lmiller@venera.isi.edu (no uucp)