InterviewSolution
Saved Bookmarks
| 1. |
I Was Trying To Allocate An Array Of Function Pointers Using The New Operator But I Keep Getting Declaration Syntax Errors Using The Following Syntax: New Int(*[10])(); What's Wrong? |
|
Answer» The NEW operator is a unary operator and binds FIRST to the int keyword producing the FOLLOWING: (new int) (*[10])(); You NEED to put parentheses around the expression to produce the expected results: new (int (*[10]()); The new operator is a unary operator and binds first to the int keyword producing the following: (new int) (*[10])(); You need to put parentheses around the expression to produce the expected results: new (int (*[10]()); |
|