RE:Re: pointers in interactive use (fwd)

Masaharu Goto (MXJ02154@niftyserve.or.jp)
Thu, 04 Jun 1998 21:42:00 +0900


Damir and Pasha,

>Damir Buskulic writes:
> > Just a strange behaviour. If you do :
> >
> > root [0] TH1F* h3("h3","h3",10,0.,1.)
>
> just curious : why didn't CINT catch this obvious syntastic error?
>
> regards, pasha

I am not checking this. Cint confuses it as
TH1F* h3(initval);
and pointer to string "h3","h3".... was used as initializer.

It is possible but no so simple to check. Consider following.

THF1* h1(int a,char b)
THF1* h2(NULL)
THF1* h3(h1(1,'c'))
THF1* h4(("h1","h2",1,(THF1*)0))
THF1* h5("h1","h2",1,(THF1*)0)

Only the last one is illegal. I'll leave this at this moment.

Masaharu Goto