its supposed to get a bunch of characters form a file, convert them to uppercase, and output the new files. It prints some wierd character, in dataout, but now what im looking for. Anyways here is the code.
Code:
#include <stdio.h>
#include <stdlib.h>
#include <ctype.h>
#include <iostream.h>
int main(void)
{
char letters;
FILE *datain;
FILE *dataout;
datain = fopen("datain.txt", "r");
if(datain == NULL)
{
printf("File Open Error!\n");
return (0);
}
while (feof(datain)!= 0)
{
fscanf(datain, "%c", &letters);
}
fclose(datain);
dataout = fopen("dataout.txt", "w");
fprintf(dataout, "%c", toupper(letters));
fclose(dataout);
return 0;
}