3

When I type printf, Xcode give me an autocomplete-hint like printf(const char *restrict, ...).

I want to know what does "const char *restrict mean?
And where can I find more information about these parameters which Xcode throws for every function?

4

1 回答 1

0

这背后并没有什么神奇之处:Xcode 会查看您包含的标头,检查函数原型并计算签名,并在您键入时根据它看到的前缀为您提供提示。

查看包含的标头的标头文档以了解它们具有哪些功能以及参数是什么。例如,printfstdio.h标头的一部分,在此处记录。的签名printf如下:

int printf(const char *restrict, ...);

这就是 Xcodeprintf(const char *restrict, ...)在您键入时建议提示的原因。

于 2014-12-04T02:33:27.520 回答