Histogram color

I am new in ROOT. I am working with ROOT in compaq alpha system. When I apply the command,
hist->SetFillColor(kBlue)
system crashes. :confused: Please help ,how i can color a histogram.

Thanking you for any help in advance.
Regards,
Srijit

I cannot reproduce this problem. Can you send a small example showing it ?
Thanks.

Olivier

A brief part of my program is given below. I am reading data from a list data file.

[size=150][color=red]#include<iostream.h>
#include<fstream.h>
#include<TH1S.h>
int tlist()
{
TH1F *hist= new TH1F ( “hist”, data_read, 499,0,500);
TCanvas *c1= new TCanvas ( “c1”, “Mypad”, 499,0,500);
c1->SetFillColor(44);
c1->cd();
ifstream in_file;
in_file.open(filename…);

while(1){

hist->Fill(i,spec[i]);
hist->SetFillColor(kRed) ; // also i have applied hist->SetFillColor(4)
hist->Draw();


…[/color][/size]
The program goes like that. The program gives results perfectly in ROOT
as long as there is no filling of histogram by colors. But as I applies that in
the program or by a macro or even by command, the alpha crashes.
But I can Color the pad without any problem. Please help.

Thank you in advance,
srijit.

This small sample looks fine seems to me. But I cannot run it. Can you make a small example program, reproducing the problem, which I can run on my PC ?

Thanks, Olivier