Hi, This macro works for me in ROOT/Cint: { gROOT->Reset(); const int MaxHistos = 24; // Initialize array of pointers char* HisXTit[MaxHistos] = { "xCal", "yCal", "yCal", "xHES", "yHES", "yHES", "xCal", "yCal", "yCal", "rCal", "rCal", "rCal", "rHES", "rHES", "rHES", "rCal", "rCal", "rCal", "zCal", "xCal", "xCal", "yCal", "yCal", "zCal" }; int i; for(i=0;i<MaxHistos;i++){ printf("%s\n",HisXTit[i]); } } C++ compiler (MSVC++6.0) gives me the same result in the both cases. Radovan > I have tried to use the following initialization of string > > > { > const int MaxHistos = 24; > char HisXTit[MaxHistos][5] = {"xCal", "yCal", "yCal", > "xHES", "yHES", "yHES", > "xCal", "yCal", "yCal", > "rCal", "rCal", "rCal", > "rHES", "rHES", "rHES", > "rCal", "rCal", "rCal", > "zCal", "xCal", "xCal", > "yCal", "yCal", "zCal"}; > > int i; > > for(i=0;i<MaxHistos;i++){ > printf("%s\n",HisXTit[i]); > } > } >
This archive was generated by hypermail 2b29 : Tue Jan 02 2001 - 11:50:32 MET