gpt4 book ai didi

C 结构 - 字段类型不完整

转载 作者:太空宇宙 更新时间:2023-11-04 08:05:50 24 4
gpt4 key购买 nike

在我的头文件中我有这个

    typedef struct _client_value
{
int client_id;
struct timeval t;
size_t size;
char value[0];
} client_value;

我已经包括了<time.h>但是当我编译时,它说:field 't' has incomplete type struct timeval t .

我不明白这怎么会发生。

最佳答案

它的 #include <sys/time.h>

关于C 结构 - 字段类型不完整,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42991018/

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