delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/10/04/14:53:46

From: "Damian Yerrick" <web DOT poison AT pineight DOT 8m DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: BASIC : how to open a file?
Date: Mon, 4 Oct 1999 10:41:02 -0500
Organization: Rose-Hulman Institute of Technology
Lines: 37
Message-ID: <7tahub$if0$1@solomon.cs.rose-hulman.edu>
References: <7ta23q$pqv$1 AT nnrp1 DOT deja DOT com>
NNTP-Posting-Host: yerricde.laptop.rose-hulman.edu
X-Trace: solomon.cs.rose-hulman.edu 939051787 18912 137.112.101.169 (4 Oct 1999 15:43:07 GMT)
X-Complaints-To: news AT cs DOT rose-hulman DOT edu
NNTP-Posting-Date: 4 Oct 1999 15:43:07 GMT
X-Newsreader: Microsoft Outlook Express 5.00.2314.1300
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

<fiammy AT my-deja DOT com> wrote in message news:7ta23q$pqv$1 AT nnrp1 DOT deja DOT com...
> I am really ignorant about some aspects of C programming, hence this
> question:
>
> Could you give me an outline of a routine that loads a file (in DOS),
> and returns a pointer to the structure in which you read the file?

Look up fopen() in your documentation.
FILE *fp = fopen("foo.txt", "r");

> I did something that should work, but my compiler DJGPP 2.02 tells me
> of an unary pointer.

Please post:

1. Version number of DJGPP, gcc, binutils, and any add-ons
   (Allegro, RSXNTDJ, etc.) you are using.
2. Your operating system (DOS? Sin95? 98? NT?)
3. The smallest source code fragment that produces the error.
4. The command line you are using to make the program.
5. Any error messages you get, and the output from symify.exe if there is a
   list of traceback EIPs.

> If possible, mail this answer also to me,
> Thanks
>
> David

HTH


Damian Yerrick
http://come.to/yerrick



- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019