i am little bit confused to access the class function through pointer.
Whether
Consider the pointer variable
Class Ball
{
Void Do()
{
}
}
Void main()
{
Ball &r = *(new Ball );
}
Can i access via
r.Do();
r->Do();
Which way is correct and please explain me why it is like that ?