samedi 30 avril 2016

Connecting three different objects

I asked a similar question a couple of hours ago about connecting two elements of a vector. Now, I would like to make my question more general. Let's assume that we have two objects of the type double namely double d1, d2. We want the third object (double d3) to obtain the value of d1+d2, such that if we change d1 or d2, then d3 automatically obtains the new value of d1+d2. How can we do it in C++?

Thanks.

Aucun commentaire:

Enregistrer un commentaire