You overwrite the internal array nomhisto in your example in strcat.
You must increase the dimension
char nomhisto[15]; //you must increase this dimension
for (j=0; j<12;j++)
{
nbfils = (run->Getobj(0))->Getnb_fils_lattes();
for (i=0;i<6;i++)
{
sprintf(nomhisto,"demi-plan%d:",i+1);
strcat(nomhisto,name);
strcat(nomhisto,(run->Getobj(j))->GetnomObjNA50());
Rene Brun
Primrose Mbanefo wrote:
>
> Hello everyone,
> I'm new to root talk but I would really appreciate some help with ROOT.
>
> After executing a macro which uses the classes I created I have no error
> messages but on trying to quit ROOT with ".q " I get the following error
> message:
> *** Break *** segmentation violation
> Has anyone ever had this type of error and where could it be coming from?
>
> Thank you for your time.
> Primrose
This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:56 MET