How would you write this assignment:
p1->caracter='B';
otherwise using *
instead of ->
?
How would you write this assignment:
p1->caracter='B';
otherwise using *
instead of ->
?
You first get the value of the object and then access the member normally:
(*p1).caracter = 'B';
This operator is just a way to derrefer the pointer and access its member.