预期表达式"函数的隐式声明在c99中无效"

Spa*_*Dog 0 iphone ipad ios

此时我正在使用收据验证进行测试,但Xcode正在抱怨这些行

require(signature_length > offsetof(struct signature_blob, certificate), outLabel);
Run Code Online (Sandbox Code Playgroud)

require(signature_length - offsetof(struct signature_blob, certificate) >= certificate_len, outLabel);
Run Code Online (Sandbox Code Playgroud)

说:"预期表达式 - 函数'offsetof'的隐式声明在C99中无效"

我该如何解决?

rma*_*ddy 5

#import <Foundation/Foundation.h>在文件中使用标准将解决问题.

当然,如果你不需要任何基础课程,那么就像其他人所说的那样,包括stddef.h.