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

Glib GIOChannel -

jsp - java.sql.SQLException: [Microsoft][ODBC Microsoft Access > Driver] Too few parameters. Expected 1 -

delphi - When I encode/decode SMS PDU (GSM 7 Bit) user data, do I need prepend the UDH first? -