what if i declare an obj with a pointer in struct,do i need -> when i refer to it?
It doesn't matter what is inside the struct. If the struct itself is being accessed with an object, you use the (.). If the struct itself is being accessed with a pointer, you use the arrow (->)
1 2 3 4 5 6 7 8 9 10 11
a.pointer = whatever; // doesn't matter that 'pointer' is a pointer.
// 'a' is an object, therefore we use the dot
Example* b = &a;
b->pointer = whatever; // 'b' is a pointer, so we use ->