getting current date in C in the VC environ

S

Scamjunk

Hi,

I am basically a linux person being made to work on windows. and i have
been given a limited version of the windows i guess - for it doesn't
provide a proper help option :(. I sorely miss working on linux. but
now, I need to get the current date and if possible the current time as
well, from the system. I tried a lot of the inbuilt functions (like
localtime()) but it gave me errors that i couldn't rightly comprehend.
could anybody help me out with the function and its syntax, please?

Thanks a lot for your time and patience.

regards,
Scam.
 
R

Richard Bos

Scamjunk said:
I am basically a linux person being made to work on windows. and i have
been given a limited version of the windows i guess - for it doesn't
provide a proper help option :(. I sorely miss working on linux. but
now, I need to get the current date and if possible the current time as
well, from the system. I tried a lot of the inbuilt functions (like
localtime()) but it gave me errors that i couldn't rightly comprehend.

Are you a programmer or a luser? _Quote_ error messages, damn it! How
the blazes are we to help you solve your problem when all you're saying
is "it doesn't work"? I expect that kind of error report from my
clueless users, not from a colleague.
could anybody help me out with the function and its syntax, please?

If localtime() doesn't do the same thing under Windows as it does under
Linux, then either your Windows implementation is not a real C compiler,
or your Linux one isn't real C, or both. Or perhaps you weren't using it
correctly on Linux in the first place? We can't tell unless you post
code.

Richard
 
R

Richard Heathfield

Scamjunk said:
Hi,

I am basically a linux person being made to work on windows. and i have
been given a limited version of the windows i guess - for it doesn't
provide a proper help option :(.

Service Pack 7 fixes that (and all other Windows problems), and is
downloadable for free, from: http://www.isolinux.org
I sorely miss working on linux. but
now, I need to get the current date and if possible the current time as
well, from the system.

"The C Programming Language", Kernighan and Ritchie, 2nd edition, 1988,
Prentice Hall. I draw your attention particularly to pages 255-257.
 
R

Richard Heathfield

ern said:
VC environment...

....is irrelevant, since the question can be answered in standard C terms,
and was asked in a standard C newsgroup.
 

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
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top