0

What is the difference between . and -> ??

For example A.Func() and A->Func()

26th Jan 2017, 9:47 PM
Allie
2 odpowiedzi
+ 3
if you have direct access to the object then use dot operator and if you are accessing the object by pointer then use -> eg: A a; a.methods(); A* pa=&a; pa->methods();
26th Jan 2017, 10:20 PM
Ashwaghosh Sadanshiv
Ashwaghosh Sadanshiv - avatar
+ 1
The dot represents a member of an object, the arrow represents a member of a pointer to an object.
26th Jan 2017, 9:55 PM
Division by Zero