| delorie.com/archives/browse.cgi | search |
| From: | Erik Max Francis <max AT alcyone DOT com> |
| Newsgroups: | comp.os.msdos.djgpp |
| Subject: | Re: files and Djgpp |
| Date: | Tue, 17 Jun 1997 21:29:00 -0700 |
| Organization: | Alcyone Systems |
| Lines: | 22 |
| Message-ID: | <33A7640C.6509B9F7@alcyone.com> |
| References: | <33a4bf36 DOT 4789992 AT news DOT redestb DOT es> |
| NNTP-Posting-Host: | newton.alcyone.com |
| Mime-Version: | 1.0 |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
Javier Loureiro Varela wrote:
> I open my file using:
>
> file = fopen(argv[1], "r");
>
> If I use _read(), it seems to work, but I need to use fread...
>
> Any suggestion?
Your description is a little brief, but it sounds like you're trying to
read a binary file. In that case you should open it as binary:
file = fopen(argv[1], "rb");
--
Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
Alcyone Systems / web / http://www.alcyone.com/max/
San Jose, California, United States / icbm / 37 20 07 N 121 53 38 W
\
"Covenants without the sword / are but words."
/ Camden
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |