Print Numbers to File in C?
I'm a beginner to C but not too bad at programming all around. I'm writing a program in C that calculates the path of an object (x, y, and z coordinates) according to few equations which depend on time. I then want to print these coordinates to an output file so I can plot them. Right now, I have:

	double *t;
	double *x;
	double *y;
	double *z;


I do my calculations and fill up x, y, and z. I then try to print them to a file:


	FILE *outputFile = fopen("path.out", "w");

	for (i = 0; i<(sizeof(x)/sizeof(double)); ++i)
		char *strX = (char *) *(x+i);
		char *strY = (char *) *(y+i);
		char *strZ = (char *) *(z+i);
		fprintf(*outputFile, *strX);fprintf(*outputFile, "\t")fprintf(*outputFile, *strY);fprintf(*outputFile, "\t");fprintf(*outputFile, *strZ);


I'm getting a whole mess of errors trying to cast each double to a char *, but I'm not sure why. Is there a better way to print the doubles or to cast them to a char * for printing?
Print Numbers to File in C?
===

I'm a beginner to C but not too bad at programming all around. I'm writing a program in C that calculates the path of an object (x, y, and z coordinates) according to few equations which depend on time. I then want to print these coordinates to an output file so I can plot them. Right now, I have:

	double *t;
	double *x;
	double *y;
	double *z;


I do my calculations and fill up x, y, and z. I then try to print them to a file:


	FILE *outputFile = fopen("path.out", "w");

	for (i = 0; i<(sizeof(x)/sizeof(double)); ++i)
		char *strX = (char *) *(x+i);
		char *strY = (char *) *(y+i);
		char *strZ = (char *) *(z+i);
		fprintf(*outputFile, *strX);fprintf(*outputFile, "\t")fprintf(*outputFile, *strY);fprintf(*outputFile, "\t");fprintf(*outputFile, *strZ);


I'm getting a whole mess of errors trying to cast each double to a char *, but I'm not sure why. Is there a better way to print the doubles or to cast them to a char * for printing?