Error message:
...error C3867: 'temp::addition': function call missing argument list; use '&temp::addition' to create a pointer to member
#include "stdafx.h"
#include <iostream>
using namespace std;
struct temp
{
int addition(int x, int y)
{return (x + y);}
int operation (int x, int y, int (*functocall)(int,int))
{
int g;
g = (*functocall)(x,y);
return (g);
}
};
int main ()
{
int m;
temp momo;
m = momo.operation(3, 4, momo.addition); // !!!???
cout << m;
cin.get();
return 0;
}