Dude, you guys rock. I still can't believe i made that small error with the &. Now i have one problem it opens, it reads, but the printing does not work.
#define MAX_CHAR 40
#define MAX_ARRAY 500
FILE *inp, *outp;
char instring[MAX_CHAR], outstring[MAX_CHAR];
printf("please enter a file you would like to use.");
printf("please enter a file you would like to ouput to");
inp = fopen(instring, "r");
outp = fopen(outstring, "w");
if( inp == NULL || outp == NULL )
printf("Error: Could not open one or more required files.");
//read the text file
while(fscanf(inp, "%lf",¤t_status) != EOF)
num += 1;
in_array[num -1] = current_status;
printf("I read %i numbers", num);
//print the old data to the new text file
for(i = 0; i<num; i++)
//there hase to be a problem with this printf statement. it doesn't print to the file.
fprintf(inp, "%f", in_array[i]);
//added this to see if it really was print the correct number and it is.
printf("current number being printed is %f", in_array[i]);
printf("I printed %i numbers", i);