| www.delorie.com/archives/browse.cgi | search |
| From: | "Rob Kramer" <robk AT cyberway DOT com DOT sg> |
| Newsgroups: | comp.os.msdos.djgpp |
| References: | <200102150222 DOT NAA25220 AT new-smtp2 DOT ihug DOT com DOT au> |
| Subject: | Re: Unable to declare FILE pointer |
| Date: | Fri, 16 Feb 2001 21:17:32 +0800 |
| Lines: | 28 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Newsreader: | Microsoft Outlook Express 5.50.4133.2400 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.50.4133.2400 |
| NNTP-Posting-Host: | 203.117.157.106 |
| Message-ID: | <3a8d28b1@news.starhub.net.sg> |
| X-Trace: | 16 Feb 2001 21:18:41 +0800, 203.117.157.106 |
| Organization: | StarHub Internet Pte Ltd |
| To: | djgpp AT delorie DOT com |
| DJ-Gateway: | from newsgroup comp.os.msdos.djgpp |
| Reply-To: | djgpp AT delorie DOT com |
<snip>
>
>
> // Stuff...
>
> int openinput(char *filename) //open input file
> {
>
> FILE *fptr; // This is line 33 that returns parse error before `*'
> int result = SUCCESS;
>
> if((fptr = fopen(filename, "r")) == NULL) {
> printf("Cannot open input file: %s\n",filename);
> result = ERROR;
>
> // more stuff...
Your code is fine. If it doesn't compile, you've either done something nasty
in '// Stuff' or your DJGPP installation is badly broken. Check your
stdio.h, and check with -H if it really gets included.
Cheers,
Rob
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |