Is it better to use pointers or dots when associating functions? | Sololearn: Learn to code for FREE!
Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren
+ 1

Is it better to use pointers or dots when associating functions?

1st Jan 2017, 11:32 PM
Daniel Hataway
Daniel Hataway - avatar
3 Antworten
0
Do you mean obj->function() vs (*obj).function ?
4th Jan 2017, 9:47 PM
unixunited
unixunited - avatar
0
yes
5th Jan 2017, 3:37 PM
Daniel Hataway
Daniel Hataway - avatar
0
There is no difference after it gets compiled, the only real difference is one is easier to read than the other.
5th Jan 2017, 4:35 PM
unixunited
unixunited - avatar