What is the difference between :
int (*wskNaF)(int, int) = addition;
and this line
int (*wskNaF)(int, int) = &addition;
score is exactly the same:
#include <cstdio>
int addition( int a, int b );
int (*wskNaF)(int, int) = addition;
//int (*wskNaF)(int, int) = &addition;
int main()
{
printf("Score= %d\n", wskNaF(5,7));
return 0;
}
int addition( int a, int b )
{
return a + b;
}
// g++ test.cpp -o test && ./test
I supposed that function name is also her pointer? Am I wrong?