I found the mistake in the statement:
ch=getc(file) != EOF
which should be
(ch=getc(file)) != EOF
due to operator precedence.
User Profile
Collapse
-
temp=tmpfile() lose all its contents?
Dear there,
I wrote a simple all->unix ascii file converter on fly, see the comments below. I am using temp=tmpfile() to hold contents for later processing, but it seems lost later on.
...Code:/* FILE* file is assigned before calling this routing. After calling this routine, 'file; is supposed to point to the temporary file stream with processed content. However, I found later that file has no content
No activity results to display
Show More
Leave a comment: