3 ms·
The actual rule is "declaration follows use". int p[5] means the type of p[5] is int (but you still have to remember valid elements are 0-4). void (signal(voi
by immibis 2y ago
The actual rule is "declaration follows use".
int p[5] means the type of p[5] is int (but you still have to remember valid elements are 0-4).
void (signal(void()(int))(int) means the type of (signal(something that is a void()(int))(42) is void. And void(p)(int) means the type of (p)(42) is void.
If you can remember the precedence of these operators, you automatically remember the precedence of their "type operators" as well.
- nialv7 2y agoyeah, this is so simple, i don't understand why people keep invent more complex and worse rules to understand cdecl...