Hi ROOTers,
I want to create an array of TButton in a function:
void Test() {
Int_t icount, jcount;
TButton *but[20][20];
for (icount = 0; icount < 20; icount++)
for (jcount = 0; jcount < 20; jcount++){
but[icount][jcount] = new TButton("","",x1,y1,x2,y2);
but[icount][jcount]->Draw();
}
}
I get:
Error: Non-static-const variable in array dimension FILE:SimGui.C
LINE:553 (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.)
But when I try to call same code from a macros all work succefully.
Thanks for any help,
George.
This archive was generated by hypermail 2b29 : Thu Jan 01 2004 - 17:50:09 MET