Problem when using float variable in a graph

I am trying to draw a very simple graph with errors. My code is the following

[code]# include “TCanvas.h”

include “TROOT.h”

include “TGraphErrors.h”

include “TStyle .h”

include “TMultiGraph.h”

include “TF1.h”

include “TLegend.h”

include “TPaveStats .h”

include “TArrow.h”

include “TLatex.h”

include “TPaveText.h”

include “TText .h”

include “TPavesText.h”

void GraphWithErrorBars(){
c1 = new TCanvas(“c1”,“A Simple Graph with error bars”,200,10,700,500);
c1->SetFillColor(42);
c1->SetGrid();
c1->GetFrame()->SetFillColor(21);
c1->GetFrame()->SetBorderSize(12);
// create the coordinate arrays
Int_t n = 5;//The number of data
Float_t x[n] = {0.041, 0.119, 1.001, 10.795, 100.368};
Float_t y[n] = {2.4, 1.7, 0.2, 0.2, 0.2};
// create the error arrays
Float_t ex[n] = {.05,.1,.07,.07,.04};
Float_t ey[n] = {.8,.7,.6,.5,.4};
// create the TGraphErrors and draw it
gr = new TGraphErrors(n,x,y,ex,ey);
gr->SetTitle(“TGraphErrors Example”);
gr->SetMarkerColor(4);
gr->SetMarkerStyle(21);
gr->Draw(“ACP”);
c1->Update();
}[/code]

When I run this macro I get the error

[quote]Error: Non-static-const variable in array dimension GraphWithErrorBars.C:23:
(cint allows this only in interactive command and special form macro which
is special extension. It is not allowed in source code. Please ignore
subsequent errors.)[/quote]

A canvas really pops out, but with no graph at all. What could the issue be here? Thank’s in advance!

do

const Int_t n = 5;//The number of data

This really solved the problem!
Thank you!