Hiya everyone, i have a problem ive been trying to write to a file but when i open that file its empty. The programs builds so ive come to the conclusion that im missin something or i have written it wrong.
Code:int Registration(int* user) { FILE *db; char chr; int putc(int ch, FILE *db); db = fopen("Info.txt", "a"); printf ("Enter Registration user here:"); chr = getchar(); scanf ("c", &chr); putc(chr, db); printf ("\nRegistration Accepted!!"); }