Hi. I am trying to assign the value returned by asctime(struct tm *) to a string. But when the program is run, I got segmentation fault. GDB shows:
Program received signal SIGSEGV, Segmentation fault.
0x0000003e6d6aa192 in __offtime () from /lib64/libc.so.6
What could be the reason? Can't we assign the value returned by asctime() to a string?
Thanks in advance.