开发者

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)();

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜