If I understand what your trying to say, your talking about having more then one file to output data to. All you have to do is declare more then one file pointer, for example:
Code:
/*File Pointers*/
FILE *output1; //pointer 1
FILE *output2; //pointer 2
/*Variables*/
int num1 = 12; //num for file1
int num2 = 67; //num for file2
/*open files*/
output1 = fopen("c:\\ouput1.txt","w"); //You can put what
output2 = fopen("c:\\output2.txt","w"); //ever the the file location
/*Write nums to file1*/
fprintf(output1,"%d", num1);
/*Write nums to file2*/
fprintf(output2, "%d", num2);
If you have to 2 files, and what to input them to your program, this is an example, its pretty much the same as above.
Code:
/*File Pointers*/
FILE *input1; //pointer 1
FILE *input2; //pointer 2
/*Variables*/
int num1; //num from file1
int num2; //num from file2
/*open files*/
input1 = fopen("c:\\input1.txt","r"); /*open file1*/
input2 = fopen("c:\\input2.txt","r"); /*open file2*/
/*Set num1 to files in input1*/
fscanf(input1,"%d", &num1);
fgetc(input1);
/*Set num2 to files in input2*/
fscanf(input2,"%d", &num2);
fgetc(input2);
/*Display numbers from File1*/
printf("File1\t%d", num1);
printf("\nFile2\t%d",num2);
I hope that answers your question a little, if you need anything further, ask, and i'll send you i'd be glad to answer it, or point you in the right direction
Hope it helped;
S0n1C!