Hi Paymon, this is not a problem, but one of the first rules of C language:
by default result of division of 2 integers is also an integer, so 1/5=0.
I wonder if you read a book on C by Kernigan and Ritchie? - If not, I'd
REALLY encourage you not only to read it carefully, but to have it on your
desk. The next book along this line could be the one on C++ by Stroustroup,
comment about having it on the desk applies as well. These 2 books are
extremely helpful and contain answers to significant number of questions.
-best, Pasha
On Sun, 21 Dec 2003 21:28:02 -0600 (CST)
payman hosseini <phossein@midway.uchicago.edu> wrote:
>
> hi
>
> say i have:
> TH1F * n = new TH1F("n","n",10,0,10)
> n->Fill(5)
> n->Draw();
>
> this will correctly show one bar in bin 6.
> now if i do:
> int j=5
> n->Scale(1/j)
>
> then the histogram becomes zero.
> but if i do
> n->Scale(.2)
> every thing works fine
>
>
> is this supposed to happen?
>
> thanks
> paymon
>
>
>
> > i am using:
> > Windows/NT/w2000 with VC++ 7.0,compiled with debug info, version 3.10/02
> > (good old tar file)**WIN32GDKDEBUG
>
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:17 MET