What does this definition mean in C language? A pointer to what?
int *a();
int *a();
is the declaration of a function that takes an unspecified (but fixed) number of arguments and returns an int *
.
It is different than:
int *a(void);
which is the declaration of a function that takes no argument and returns an int *
.
The former declaration is an obsolescent feature, use the second form to declare a function with no parameter.
you can use the cdecl
command by typing
explain int *a()
and you will get
cdecl> explain int *a()
declare a as function returning pointer to int
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.