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?
There is no magic behind this: Xcode looks at the headers that you included, checks function prototypes, and figures out signatures, and provides you hints as you type based on the prefixes that it sees.
Look at the header documentation for the headers that you include to find out what functions they have, and what are the parameters. For example,
printf
is part ofstdio.h
header, which is documented here. The signature ofprintf
is as follows:That is why Xcode suggests
printf(const char *restrict, ...)
for the hint as you type.