typedef resolution rule

Posted by kumar_m_kiran on Stack Overflow See other posts from Stack Overflow or by kumar_m_kiran
Published on 2010-05-01T08:29:28Z Indexed on 2010/05/01 8:37 UTC
Read the original article Hit count: 229

Filed under:
|
|

Hi All,

Can you Please tell me the resolution rule involved in resolving the meaning of the variable in a typedef. Any link related to the same will be very useful.

Example

#typedef string* pstring;
const pstring parr;

Here confusion arises whether const'ness is for pointer or the content.

Now based on what thumb rule do can we start resolving the above interpretation of the pstring?.

Smilarly, If I have a very complex typedef'ed variable, like #typedef void (func*)()(int), I should be able to resolve it using the thumb rule.

Thanks in advance for your suggestions

© Stack Overflow or respective owner

Related posts about typedef

Related posts about name