I've been trying to remove characters for the middle of a file using a temporary file. However, when I call
fputc(c, tmpfile);
where c is a char and tmpfile is a FILE*, I get the following when compiling:
dnhobf_fxn.cc:36:7: error: no matching function for call to 'fputc'
fputc(c, tmpfile);
^~~~~
/usr/include/stdio.h:243:6: note: candidate function not viable: no known
conversion from 'FILE *()' to 'FILE *' (aka '__sFILE *') for 2nd argument
int fputc(int, FILE *);
^
What exactly is the issue here, and how can I rectify it? I am unfamiliar with the difference between a FILE *() and a FILE *.
Aucun commentaire:
Enregistrer un commentaire