Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在尝试解析存档文件的标题,我需要跳过标签。我一直在尝试fseek()这样做,但我无法确定它是否可能。
fseek()
这是一个示例,尽管我确定语法不正确:
fseek(stream, (long)"\t", SEEK_CUR);
我需要使用一种方法来移动文件指针,因为我需要跳过文件并将文件名从每个标题中拉出(制作存档内容的表格。)
不 - 因为fseek您指定要移动的距离,而不是要搜索的东西。
fseek
要跳过制表符,您通常会读取一个字符,如果它是一个制表符,则忽略它并读取另一个字符。