ROOT/CINT problem ?

From: Nick van Eijndhoven (Nick@fys.ruu.nl)
Date: Tue Jun 17 1997 - 15:25:26 MEST


Dear friends,
I am trying to make a dynamical matrix allocation in view of
developing a class to handle modular calorimeters.
Below you find my test program which runs correctly under g++ but
crashes if I do :

root -b -q main.cc >main.log

Could anyone tell me what I am doing wrong and how to do it correctly,
or is the ROOT crash due to a ROOT/CINT bug ?

                                                       Cheers,
                                                        Nick.     
*----------------------------------------------------------------------*
 Dr. Nick van Eijndhoven                Department of Subatomic Physics
 email : nick@fys.ruu.nl                Utrecht University / NIKHEF
 tel. +31-30-2532331 (direct)           P.O. Box 80.000
 tel. +31-30-2531492 (secr.)            NL-3508 TA Utrecht
 fax. +31-30-2518689                    The Netherlands
 WWW : http://www.fys.ruu.nl/~nick      Office : Ornstein lab. 172
 ----------------------------------------------------------------------
 tel. +41-22-7679751 (direct)           CERN PPE Division / ALICE exp.
 tel. +41-22-7675857 (secr.)            CH-1211 Geneva 23
 fax. +41-22-7679480                    Switzerland
 CERN beep : 13+7294                    Office : B 160 1-012
*----------------------------------------------------------------------*

//======================== file main,cc ================================
//*** Program to test matrix addressing
//*** NvE 13-jun-1997 UU-SAP Utrecht ***

#include <iostream.h>
#include <math.h>

void main()
{
 int** a;
 int n=5;
 int m=7;
 a=new int*[n];
 for (int i=0; i<n; i++)
 {
  a[i]=new int[m];
 }
 a[2][3]=27;
 cout << " a[2][3] = " << a[2][3] << endl;
 delete [] a;
}



This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:26:19 MET