Let's say I've objects A and B.
Is it a good practice to call functions/parameters like this:
A[B->getValue()].setValue(C.getValue() + 10);
Consider all the required assumptions like A is an array, B is object pointer, C is an object, setValue and getValue are methods of that class etc.
The only gist of this question is if calling functions like that is good? Or should it be more like:
Temp1 = b->getValue();
Temp2 = c.getValue();
A[Temp1].setValue(Temp2 + 10);
Aucun commentaire:
Enregistrer un commentaire