Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.2 9/18/84; site watdcsu.UUCP
Path: utzoo!watmath!watnot!watdcsu!broehl
From: broehl@watdcsu.UUCP (Bernie Roehl)
Newsgroups: net.micro.pc
Subject: Re: Pathnames in "C" compilers (Help!)
Message-ID: <1684@watdcsu.UUCP>
Date: Mon, 23-Sep-85 14:12:03 EDT
Article-I.D.: watdcsu.1684
Posted: Mon Sep 23 14:12:03 1985
Date-Received: Tue, 24-Sep-85 03:23:24 EDT
References: <450@philabs.UUCP>
Reply-To: broehl@watdcsu.UUCP (Bernie Roehl)
Distribution: net
Organization: U of Waterloo, Ontario
Lines: 26



In article <450@philabs.UUCP> brb@philabs.UUCP (Brian Bertan) writes:
>
>The function:
>
>          infile=fopen("c:\usr\text\things.txt","r")
>
>returns NULL to infile.

Remember that in C, the \ character is an escape (\n for newline, for example).
To get what you want, double the \'s, as in

           infile = fopen("c:\\usr\\text\\things.txt", "r");
>
>The function:
>
>          infile=fopen("things.txt","r")
>
>does NOT return NULL

... because there are no \'s in it.
 
Hope this helps (quite sure that it will!)

				--Bernie