c++ - Calling overloaded operator () from object pointer -


consider following:

class myclass { public:    int operator ()(int a, int b); }; 

when have:

myclass* m = new myclass(); 

i want access operator() method, could:

(*m)(1,2); 

but can this?

m->(1,2); 

not syntax, can do

 m->operator()(1,2); 

Comments

Popular posts from this blog

c# - SVN Error : "svnadmin: E205000: Too many arguments" -

c# - Copy ObservableCollection to another ObservableCollection -

All overlapping substrings matching a java regex -