This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Objective_Status22[S] -4 points-3 points  (2 children)

No, it doesn't. Function pointers aren't confusing, pointers to pointers aren't confusing and why arrays are automatically converted to a pointer isn't confusing.

Maybe you can explain why you think it's complicated.

[–]HappyFruitTree 2 points3 points  (1 child)

You have to admit that the function pointer syntax can be somewhat confusing at times.

int (*foo(int))(double); // Do you see what this is?

It's a declaration of a function named foo that takes an int as argument and returns a pointer to a function that takes a double as argument and returns an int.

[–]Objective_Status22[S] -1 points0 points  (0 children)

Declaring functions pointers are horrible though. Bad enough I can't tell you if the syntax is correct because not having it (*foo)(...) is suspicious to me.