this code is a little documented, so you can easier understand the purpose of this program.
/* an array will be printed in the desired file.
fputs doesnt work with count() function. why?
FILE *datei; //filename declared
int hello; //this is going to be printed
int i, stop;
printf("enter filename: ");
datei = fopen (filename, "w+");
if (datei == NULL)
printf("an error occured\n");
printf("an one dimensional array is going to be printed in your file\n\n");
fputs(count(), datei); //this line is supposed to write
//the return values of int count()
// to the file called datei
scanf("%d", &stop); //this line only exists to stop
//the program, no deeper sense
int i, hello ;
hello[i] = 10;
the fputs line doesnt work with the function.
i typed: fputs(count(), datei);
my compiler doesnt seem to like it.
how do i print a whole function to a file? this time the count() function.