Hi all,
Why do I get a fatal error when I try and free this memory?
char *timeBegin = (char *)malloc(sizeof(char) * 21);
timeBegin = time_stamp();
sleep(1);
char * test;
test = calc_time_difference(timeBegin);
printf("%s", test);
free(timeBegin);
time_stamp() returns a static char array. Would this be the cause?