Newbie needing answers

Hi all.

I'm a bit of a newbie at C++ and at present l'm studying for a c++ exam.

Can someone please explain to me what this does -> ???

And how it's used etc. Has it got something to do with accessing member functions within a class ??? If so why don't we just use the . symbol instead ??


Please email me back as l'm having a tough time finding an answer that explains it in basic terms. An example of using it would be really helpful as l learn best from examples.


Thanks to all.

Steve
If you are using a pointer to access a member function of a class, you would naturally write:
(*p).myfunction();

But using "->" you can instead just write:
p->myfunction();

I believe there is some other use for it aswell, which my memory can't seem to recall.
But anyway, hope that clears it up for you :)
Topic archived. No new replies allowed.