samedi 20 août 2016

Why are member functions in C++ accessed with dot operator after object name?

In Python any bound call to member funtion or method gets converted to unbound call i.e. obj.method() is equivalent to method(obj), thats why first parameter of every member function is self. Is there a similar concept in C++ that explains why member function are accessed with dot operator?

Aucun commentaire:

Enregistrer un commentaire