Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site drivax.UUCP Path: utzoo!linus!philabs!prls!amdimage!amdcad!amdahl!drivax!alan From: alan@drivax.UUCP (Alan Fargusson) Newsgroups: net.micro.pc Subject: Re: Pathnames in "C" compilers (Help!) Message-ID: <241@drivax.UUCP> Date: Tue, 24-Sep-85 14:31:08 EDT Article-I.D.: drivax.241 Posted: Tue Sep 24 14:31:08 1985 Date-Received: Fri, 27-Sep-85 07:18:58 EDT References: <450@philabs.UUCP> <160@micropro.UUCP> Distribution: net Organization: Digital Research, Monterey, CA Lines: 28 > In article <450@philabs.UUCP> brb@philabs.UUCP (Brian Bertan) writes: > >I am unable to open files using a directory search with either the > >Mark Williams or Lattice "C" compilers. The file really does exist > > ... > > > >The function: > > > > infile=fopen("c:\usr\text\things.txt","r") > > > >returns NULL to infile. > > ... > >Does anyone know why I can't properly use a pathname in fopen() ? > > Brian Bertan > > Sounds to me that you need to double the backslashes in your pathname, > a problem that Unix C programmers would never encounter. Try: > > infile=fopen("c:\\usr\\text\\things.txt","r") > This sounds very unlikly to me. I would suspect that the runtime is using DOS 1.0 style calls, and not DOS 2.0 style calls. Let me know what you find out. -- Alan Fargusson. { ihnp4, amdahl, mot }!drivax!alan