Say you have a pointer to a class, and say that class has a pointer to another class, and you need to access a member of that inner class. You could use something like the following:
(*(*classouter).classinner).member
...but I'm pretty sure that many programmers would agree with me in saying that this doesn't look very nice. Instead, you could use the -> operator to express the same thing like this:
classouter->classinner->member
Isn't that a lot easier to read? :) You can think of it like the . operator except for pointers to classes.
Your question essentially tells us that you're very inexperienced. That's no crime; what does seem foolish is to think that because you don't use them, they are useless.
You use pointers:
- To control object lifetime yourself beyond local scope.
- When you need to make an object that is too big to fit on the stack (very common, especially workig with large files such as images).
- To implement polymorphism.
- More.