Reputation: 19
First option works fine but when I opted for second option { (struct node)* arr[] }
I got an declaration error. Please make me know where am I wrong?
Upvotes: 0
Views: 311
Reputation: 2188
In this case, the compiler interprets the parentheses to denote the cast operator. Basically, parentheses are never needed in a declaration like this, so don't use them--they will be interpreted as something else.
EDIT:
Parentheses may be needed in some declarations, like a function signature for a callback parameter.
Upvotes: 1