Hi all!!
i am relatively new to c... and I need to help urgently!
i have date and time in 2 separate strings. i have parsed them. eg
I had 26.2.2007 and I parsed it so that i have day month and year in different integer varaibles i.e. a=26; b=2;c=2007;
Similarly I have the time also parsed and hour minute and seconds stored in different integer variables.
Now I have to store them in the struct tm or any other time format so that i can use difftime function of the time.h
a
*** stack smashing detected ***: ./a.out terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__for tify_fail+0x48)[0xb7f52138]
/lib/tls/i686/cmov/libc.so.6(__for tify_fail+0x0)[0xb7f520f0]
./a.out[0x80485b9]
[0x7d7]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:01 1400873 /home/upadhyad/Desktop/C testing/date time/a.out
08049000-0804a000 rw-p 00000000 08:01 1400873 /home/upadhyad/Desktop/C testing/date time/a.out
0804a000-0806b000 rw-p 0804a000 00:00 0 [heap]
b7e64000-b7e65000 rw-p b7e64000 00:00 0
b7e65000-b7fae000 r-xp 00000000 08:01 17088 /lib/tls/i686/cmov/libc-2.7.so
b7fae000-b7faf000 r--p 00149000 08:01 17088 /lib/tls/i686/cmov/libc-2.7.so
b7faf000-b7fb1000 rw-p 0014a000 08:01 17088 /lib/tls/i686/cmov/libc-2.7.so
b7fb1000-b7fb4000 rw-p b7fb1000 00:00 0
b7fb5000-b7fbf000 r-xp 00000000 08:01 4661312 /lib/libgcc_s.so.1
b7fbf000-b7fc0000 rw-p 0000a000 08:01 4661312 /lib/libgcc_s.so.1
b7fc0000-b7fc3000 rw-p b7fc0000 00:00 0
b7fc3000-b7fc4000 r-xp b7fc3000 00:00 0 [vdso]
b7fc4000-b7fde000 r-xp 00000000 08:01 4661267 /lib/ld-2.7.so
b7fde000-b7fe0000 rw-p 00019000 08:01 4661267 /lib/ld-2.7.so
bfc69000-bfc7e000 rw-p bffeb000 00:00 0 [stack]
Aborted
i am relatively new to c... and I need to help urgently!
i have date and time in 2 separate strings. i have parsed them. eg
I had 26.2.2007 and I parsed it so that i have day month and year in different integer varaibles i.e. a=26; b=2;c=2007;
Similarly I have the time also parsed and hour minute and seconds stored in different integer variables.
Now I have to store them in the struct tm or any other time format so that i can use difftime function of the time.h
a
*** stack smashing detected ***: ./a.out terminated
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6(__for tify_fail+0x48)[0xb7f52138]
/lib/tls/i686/cmov/libc.so.6(__for tify_fail+0x0)[0xb7f520f0]
./a.out[0x80485b9]
[0x7d7]
======= Memory map: ========
08048000-08049000 r-xp 00000000 08:01 1400873 /home/upadhyad/Desktop/C testing/date time/a.out
08049000-0804a000 rw-p 00000000 08:01 1400873 /home/upadhyad/Desktop/C testing/date time/a.out
0804a000-0806b000 rw-p 0804a000 00:00 0 [heap]
b7e64000-b7e65000 rw-p b7e64000 00:00 0
b7e65000-b7fae000 r-xp 00000000 08:01 17088 /lib/tls/i686/cmov/libc-2.7.so
b7fae000-b7faf000 r--p 00149000 08:01 17088 /lib/tls/i686/cmov/libc-2.7.so
b7faf000-b7fb1000 rw-p 0014a000 08:01 17088 /lib/tls/i686/cmov/libc-2.7.so
b7fb1000-b7fb4000 rw-p b7fb1000 00:00 0
b7fb5000-b7fbf000 r-xp 00000000 08:01 4661312 /lib/libgcc_s.so.1
b7fbf000-b7fc0000 rw-p 0000a000 08:01 4661312 /lib/libgcc_s.so.1
b7fc0000-b7fc3000 rw-p b7fc0000 00:00 0
b7fc3000-b7fc4000 r-xp b7fc3000 00:00 0 [vdso]
b7fc4000-b7fde000 r-xp 00000000 08:01 4661267 /lib/ld-2.7.so
b7fde000-b7fe0000 rw-p 00019000 08:01 4661267 /lib/ld-2.7.so
bfc69000-bfc7e000 rw-p bffeb000 00:00 0 [stack]
Aborted
Comment