Sorry if this question has been asked before, but I could find it after doing a google search. I noticed, as I was going through the tutorials, that when accessing an object's methods, you could say pointer.method(); rather than pointer->method(); Is there a preferred way, as in is it best practice to use the -> rather than pointer or even (*a).b? Thanks.
They both technically do same thing. You should use the construct that most clearly indicates to the reader of your code what is going on.
If pointer is the name of an array, then use pointer.method() - using the  should indicate that you are accessing the first member of an array, while pointer would be the second member, and so on.
If pointer is being used as a simple pointer (as the name suggests!), then use pointer->method() to make that clear.
Wow, you guys are just as fast as on the Stackexchange! Thanks for the answers. Also, sorry if this was meant to go in the beginners section, I didn't notice it as I accessed the forums through the side bar.