little explanation-operator () overload
Hello,
can anybody explain me the difference between these two memory allocations:
Code:
#include <iostream>
using namespace std;
class Test
{
/*something here*/
public:
void operator() ()
{
cout<< "Operator()";
}
};
int main()
{
Test * pT = new Test;
Test * pT2 = new Test();
}
I thought that that there is no difference except in case where operator() is overloaded but it seems that isn't true.
I need explanation about difference between Test and Test() in allocation.
Thanks