gpt4 book ai didi

fpos_t 类型可以取空值吗?

转载 作者:太空宇宙 更新时间:2023-11-03 23:28:26 25 4
gpt4 key购买 nike

我知道指针可以设置为空(例如表示指向的对象不存在),没有有效的指针会指向空;是否可以对 fpos_t 类型做同样的事情,这样就没有有效位置为空?

最佳答案

H2CO3说的我们不知道,它是不透明的。以前它是未指定,这就是 C99 draft standard 的内容在 7.19.1 部分说:

fpos_t

which is an object type other than an array type capable of recording all the information needed to specify uniquely every position within a file.

7.19.9.1 部分 fgetpos 函数 说(强调我的):

#include <stdio.h>

int fgetpos(FILE * restrict stream, fpos_t * restrict pos);

The fgetpos function stores the current values of the parse state (if any) and file position indicator for the stream pointed to by stream in the object pointed to by pos. The values stored contain unspecified information usable by the fsetpos function for repositioning the stream to its position at the time of the call to the fgetpos function.

关于fpos_t 类型可以取空值吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21192205/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com