Hussein Al-Shatri wrote:
> Hi all,
> 
> Could you just describe me what is (->) which refers to functions in c++. and 
> how to use it.
> 
> Thank you in advance.
> 
> Hussein

class MyClass
{
public:
   void b()  {}
};

MyClass a = new MyClass;
.....


a->b();

Is the same as:

(*a).b();

Is the same as:

a[0].b();


I've found that the above correlation helps people grasp the concept of 
pointers AND structure logic at the same time.

-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to