Dear All
I want to make a function in C++ where a class object will be used as argument. I tried but could not do this.
Plz. give suggestions.
Regards.
Tapasi
Hi,
have a look for example at TObject::IsEqual() at root.cern.ch/root/html/TObject#TObject:IsEqual. It gets a pointer to another object, and returns whether it and the other object are equal. You can call it like this: TNamed myObj("name","title");
if (myObj.IsEqual(&myObj))
printf("myObj and myObj are the same!\n");
Cheers, Axel.