What is this syntax for in C++? Can someone point me to the technical term so I can see if I find anything in my text?
At first I thought it was a prototype but then the = and (*fn) threw me off…
Here is my example:
void (*fn) (int&,int&) = x;
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It can be rewritten to
The 2nd statement is obvious, which should have solved that
= x;question. In the 1st statement, we makeTas a synonym as the typevoid(*)(int&, int&), which means:(*…))voidint&, int&.