Confusion about const syntax
I'm having some trouble reading a line in a program that looks like this:
char* const *(*next) ();
I think next
is a pointer to a function returning a p开发者_开发百科ointer to a const
pointer to a char
, but I'm still a bit confused. If someone could answer this ASAP that would be great!
cdecl can help you understand the more complicated declarations in C.
char* const* (*next) ();
You are declaring a function pointer called next
that returns a char* const*
(pointer to a char* const
). You were right (:
Usage :
char* const* ret = next();
or char* const* ret = (*next)();
精彩评论