Hi!
I wanted to thank you a lot for the help given yesterday...
It`s so great to have people so well prepared trying to help you!

I have another problem: the bold line :
strcat want a pointer as argument, but probably i'm mistaking it ... can anybody help me?

Code:
#include <stdio.h>
#include <string.h>

main ()
{
int i;
char j;
char *ip;

for (i = 0; i < 10; i++)
    {
	ip=&j;
      for (j = 0; j<3; j++)
	  {
		FILE *fp;
		
      char filename[17] ;
	  
      if      (i == 0) 
		{
		 	strcpy(filename, "injection-0");
			if (j==0) strcat(filename,"_11.txt");
			else if (j==1) strcat (filename,*ip);
			else if (j==2) strcat (filename,"_12.txt");
		}
if ((fp = fopen(filename, "w")) != NULL)
		{
			fprintf(fp, "mass_part    mass_flow_part   diam_part      accretion      surf_ID   cel_ID    temp           vel_abs        vel_nor        vx             vy             vz             Ax             Ay             Az             Angle		Wa		Wb		Wc		WEAR\n");
			fclose(fp);
		}
	  }
    }
}