Простой способ читать декларации в C

  • Меня всегда стопорили штуки типа:

    int (*(*vtable)[])();
    

    Оказывается существует простое правило про которое я ничего не видел у Кернигана и Ричи (пропустил?).

    1. Start at the variable name (or innermost construct if no identifier is present.
    2. Look right without jumping over a right parenthesis; say what you see.
    3. Look left again without jumping over a parenthesis; say what you see.
    4. Jump out a level of parentheses if any. Look right; say what you see.
    5. Look left; say what you see. Continue in this manner until you say the variable type or return type.

    Почувствовал себя умным :)