🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.os.msdos.programmer
Article #111

Re: FOPEN command

#111
From: Gil Nardo
Date: Tue, 03 Nov 1992 07:09
18 lines
1155 bytes
wao@aluxs.att.com (BL0528540-Bill Oswald  ALC2817) writes:
> Here is a short question. If I have a line of code as follows:
> 
> 	stream=fopen("c:\foo\afile", "r")
> 
> The resulting executable works if afile is in the same directory
> as the executable. If the above is correct the fopen command
> should be able to find afile independant of where the executable
> lives. But that does not seem to be the case. What am I doing wrong?
> BTW, I am using borland c++ 3.1

Did you try using double backslashes?
 	fp = fopen("c:\\foo\\afile", "r");
-- 
Gil Nardo                  | mcs@wet.com
Migrant Computing Services | (415)664-1032
1032 Irving Street, #435   |-----------------
San Francisco, 94122       | Supernova = *!
Technical Details
Message-ID: <4440@wet.UUCP>
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!ames!pacbell.com!hoptoad!wet!mcs
References: <1992Nov2.213552.20766@cbnewsm.cb.att.com>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!noc.near.net!news.Brown.EDU!qt.cs.utexas.edu!cs.utexas.edu!sun-barr!ames!pacbell.com!hoptoad!wet!mcs
From: mcs@wet.UUCP (Gil Nardo)
Newsgroups: comp.os.msdos.programmer
Subject: Re: FOPEN command
Message-ID: <4440@wet.UUCP>
Date: 3 Nov 92 07:09:51 GMT
References: <1992Nov2.213552.20766@cbnewsm.cb.att.com>
Distribution: usa
Organization: Wetware Diversions, San Francisco
Lines: 18