I know in C++, you're able to peek at the next character by using: in.peek();.
in.peek();
How would I go about this when trying to "peek" at the next character of a file in C?
fgetc+ungetc. Maybe something like this:
int fpeek(FILE *stream) { int c; c = fgetc(stream); ungetc(c, stream); return c; }
1.4m articles
1.4m replys
5 comments
57.0k users