Function pointer demo
Posted
by AKN
on Stack Overflow
See other posts from Stack Overflow
or by AKN
Published on 2010-04-07T07:00:58Z
Indexed on
2010/04/07
7:03 UTC
Read the original article
Hit count: 351
Hi,
Check the below code
void functionptrdemo() {
typedef int *(funcPtr) (int,int);
funcPtr ptr;
ptr = add; //IS THIS CORRECT?
(*ptr)(2,3);
}
In the place where I try to assign a function to function ptr with same function signature, it shows a compilation error as error C2659: '=' : function as left operand
© Stack Overflow or respective owner