Re: function
- From: "Bill Cunningham" <nospam@xxxxxxxxx>
- Date: Sat, 31 May 2008 16:16:25 GMT
"Joachim Schmitz" <nospam.jojo@xxxxxxxxxxxxxxxxxx> wrote in message
news:g1rq2v$nf9$1@xxxxxxxxxxxx
[snip]
Yep, left as an excercise to the reader 8-)Still needs some error checking (num>=0, fp != NULL, fclose and fput
worked)
I can get that part. I think.
Now here's what I tried in error checking that gave me a warning. I
must've messed up.
if((fputc(a,fp))!=NULL)
if((fclose(fp))!=NULL)
comparing argument with a without a cast or something like that the compiler
said. Without cast and comparing was mentioned by the compiler but it
compiled and didn't work. So I tried this.
if((fputc(a,fp))==NULL)
puts("fputc error");
When I ran the binary fputc error was mentioned 10 times. My 2nd arg was 10.
Bill
.
- Follow-Ups:
- Re: function
- From: santosh
- Re: function
- From: CBFalconer
- Re: function
- References:
- function
- From: Bill Cunningham
- Re: function
- From: Joachim Schmitz
- Re: function
- From: Bill Cunningham
- Re: function
- From: Joachim Schmitz
- function
- Prev by Date: Re: struct padding ???
- Next by Date: Re: function
- Previous by thread: Re: function
- Next by thread: Re: function
- Index(es):
Relevant Pages
|