Append a temp file to a log file
hello, i am faced with another problem that I am not sure how to tackle:
Code:
FILE *file = tmpfile();
FILE *logfile;
Code:
time_t time;
fprintf(file, "%s", ctime(&time));
Code:
logfile = fopen("logfile.txt","a");
////////////////
Append here
///////////////////////
Code:
fclose(file);
fclose(logfile);
These are little snippets of my code for my basic direction. Here I am printing the time with some commands entered in to a temp file. After the session is complete I will append the temp file to a log file. Any good way to append the temp to logfile?