char Vs struct tm mytime

N

Nimmy

Hi,

I want to scanf a couple of values (in this format "01/04/2004") from an
input file and then into a character string and them copy into struct tm
mytime

How can I do this?

Thanks
 
E

Emmanuel Delahaye

Nimmy said:
I want to scanf a couple of values (in this format "01/04/2004") from an
input file and then into a character string and them copy into struct tm
mytime

How can I do this?

I would do it with fgets(), strncat() and strtol(), but some smart people I
know will use scanf() 'in the proper way' to do int in one gulp.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,371
Latest member
Brkaa

Latest Threads

Top