Using fseek to backtrack

前端 未结 5 922
轻奢々
轻奢々 2020-12-11 19:18

Is using fseek to backtrack character fscanf operations reliable?

Like for example if I have just fscanf-ed 10 characters but

5条回答
  •  旧巷少年郎
    2020-12-11 19:52

    This is because fseek works with bytes, whereas fscanf intelligently handles that the carriage return and line feed are two bytes, and swallows them as one char.

提交回复
热议问题