I use the ctime function to get a readable representation of a variable time_t. ctimedeclared as follows:
char *ctime (const time_t *timer);
and you can see that it returns a pointer to the received char array without the char pointer passed in the arguments. Thus, I wonder where the ctimechar buffer is allocated and who will destroy it and will not allocate the internal memory function (with the exception of various malloc, of course), which are considered riots.
Any suggestions?
source
share