I have the following struct in C++
struct Jam
{
void operator()()
{
cout << "Test";
}
};
And I am able to call the overloaded function like so:
Jam j;
j();
But I was wondering what the proper way to call the function from a pointer to the same struct. For example if I have:
Jam *j = new Jam;
j->();
I receive errors telling me it needs a function name. Is this possible? Thanks!