vivekian wrote:
> Have a pointer to an object of class type task
>
> task * A ;
>
> Now this object takes operator overloading like
it doesnot make sense to say "an object takes operator overloading".
Perhaps you mean that operator<< is overloaded for class task.
>
> A<<2 ;
>
> which assigns the number 2 to one of the members of the object A.
>
> Is there a way to do this with the pointer to the object ?
>
While oveloading any operator, atleast one argument must be of user
defined type. So operator<<(task*, int) is an incorrect overloading.
Hence A<<2 will also not work
Hope that helps.
|