jeudi 5 mai 2016

c++- how to use the object which call the function?

I have function get_time() in a class which return a private member.

How can I use the object which called this function in the implementation of the function.

For example in case comp object which have a member call name call get_time function (comp.get_time()): I want to be able to get the comp.name in the implementation of the det_time_function. How can I?

Aucun commentaire:

Enregistrer un commentaire