home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sybus.sybus.com!myrddin!palan!tct!mechanic!f380.n3603.z1.FIDONET.ORG!Jeff.Tomich
- From: Jeff.Tomich@f380.n3603.z1.FIDONET.ORG (Jeff Tomich)
- Sender: ufgate@mechanic.Fidonet.org (newsout1.26)
- Newsgroups: comp.os.msdos.programmer
- Subject: FOPEN command
- Message-ID: <574.2AF8E8CC@mechanic.Fidonet.org>
- Date: Wed, 04 Nov 92 13:49:12 PDT
- Organization: FidoNet node 1:3603/380
- Lines: 28
-
- Hello BL0528540-Bill!
-
- 03 Nov 92, BL0528540-Bill Oswald ALC2817 writes to All:
-
-
- BOA> stream=fopen("c:\foo\afile", "r")
-
- BOA> The resulting executable works if afile is in the same directory
- BOA> as the executable. If the above is correct the fopen command
- BOA> should be able to find afile independant of where the executable
- BOA> lives. But that does not seem to be the case. What am I doing wrong?
- BOA> BTW, I am using borland c++ 3.1
-
- I assume *stream has been set as a pointer to point to FILE. Understanding that it is, copy the dir+filename into a variable and plug it in. Like,
-
- char fname[80];
- str(fname,"c:\foo\afile");
- stream=fopen(fname, "r");
-
-
- Jeff
-
- --
- Internet: Jeff.Tomich@f380.n3603.z1.FIDONET.ORG
- UUCP: ...!myrddin!tct!mechanic!380!Jeff.Tomich
- Note: Mechanic is a free gateway between USENET & FIdonet.
- For information write to chief@mechanic.fidonet.org
-
-