I know in C++, you're able to peek at the next character by using: in.peek();
.
How would I go about this when trying to "peek" at the next character of a file in C?
You could use a getc
followed by an ungetc
Charles Ma
来源:https://stackoverflow.com/questions/2082743/c-equivalent-to-fstreams-peek