Warning: wrong member access operator '.' D:\necessary application\root\root\macros\filegauss.cpp(33)
Error: Can't call TH1F::fill() in current scope D:\necessary application\root\root\macros\filegauss.cpp(33)
Possible candidates are...
(in TH1F)
(in TH1)
The error message says there is an error with TH1F::fill()
but I don’t that call in trou code. Are you really running the code you posted ?
Anyway TH1F::fill() is wrong. It should be TH1F::Fill()
When you post “source code” or “output” here, do remember to enclose them into two lines which contain just three characters ``` (see how your post has been edited above).
I guess you should change h->(exp(...)/(...)); into h->Fill(exp(...)/(...));.
Also, “DrawClone” is not needed. Use simply “Draw”.
Sorry,I will remember it.
And I change source code according to your suggestion,but it seens like the first result I has posted.What I need to do to see the picture?
thanks for your help.
The “h” histogram in @couet plot has 10001 entries but you have a[10000] only.
I suspect the problem on windows is that when a macro is automatically opened (by clicking on it) then root.exe is executed with “-q” (and so it automatically exits as soon as the macro finishes),