jeudi 23 février 2017

difference between -> operator and the pointer * (c++)

i know that -> operator can be a pointer to the direction of the variable, but why use it when you have * pointer operator, what is the difference, and can i prefer one over the other? for example:

a*b

means a is pointer to b (right? i could be mistaken forgive me because i'm a beginner)

is it equivalent to a->b ?

and a<-b meaning b is a pointer to a?

if so, is it possible to rely on -> because it's simpler?

Aucun commentaire:

Enregistrer un commentaire