I'm fairly new to C, hence could someone please help me understand the below struct declaration?
extern struct server_module* module_open (const char* module_path);
Per my understanding, module_open
is pointer to the struct server_module
, however, didn't understand the last part of the statement ie (const char* module_path)
extern struct server_module* module_open (const char* module_path);
declares module_open
to be a function taking a parameter named module_path
of type const char *
and returning a struct server-module *
.
module_open
is a function which returns pointer to struct server_module
and const char* module_path
is input argument type. Means function takes character string as an input extern
keyword is used to tell compiler that symbol is exist in different file
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.