i=0;
while(sentence[i]) /*ciclo per implementare la funzione toupper()*/
{
c=toupper(sentence[i]);
write(fp,c,1); /*scrive su file*/
printf("%c",c);
i++;
}
could this part of code be right?? if not why?
it doesn't write on file, and don't uppercase the sentence or the char c!!
Either what Computergeek01 said or http://www.cplusplus.com/reference/clibrary/cstdio/fwrite/
there is however no write(FILE*, char, int).
Note also that in both fwrite and ostream::write, data has to be passed by a pointer while you try to pass it by a char value.