Hi Elena,
As the compiler says, your function must be const:
Int_t Compare(TObject *obj) const
Rene Brun
Elena Vataga wrote:
>
> Hello!
>
> I wrote Compare function for my TObject following example in
> http://root.cern.ch/root/html/examples/tcollex.C.html
>
> During compilation I am getting error:
> "/pcdfarm01/vataga/WORK/CDFsoft/include/AnaMod/TMoiElectron.hh",
> line 79: warning #1142-D:
> function "TObject::Compare(const TObject *) const" is hidden by
> "TMoiElectron::Compare" -- virtual function override intended?
> Int_t Compare(TObject *obj) {
> ^
>
> This is exactly what I intended - override, but is it normal to have
> this warning?
>
> Thank you in advance,
> Elena
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:41 MET