error: called object is not a function or function pointer

As for what the error means: 2(x&y) tells the compiler to call the function 2, passing x&y as an argument (just like printf("hi") means “call printf and pass "hi" as an argument“).

But 2 isn’t a function, so you get a type error. Syntactically speaking, whenever you have a value followed by (, that’s a function call.

Leave a Comment