time and date functions

L

Luis Pedro

Hi there,
Can anyone tell me if there is any time and date standard functions
for C++ and, if so, were can I find documentation about it? If such
functions do not exist, any hint of what library should I use?

cheers

Luis Pedro
 
L

Luis Pedro

Hi Victor,
Thanks for your help. I'm already using the C Standard library for
this (e.g. ctime()). My question was more if there was any C++ library
equivalent to the C one, regarding the time and date stuff.

cheers

Luis Pedro
 
V

Victor Bazarov

Luis Pedro said:
Can anyone tell me if there is any time and date standard functions
for C++ and, if so, were can I find documentation about it?

Time functions in C++ are from the C Standard Library, so any
book on C should contain the information. Names of the functions
are 'time', 'gmtime', 'localtime', 'asctime', 'clock', 'difftime',
'mktime' (from memory). Am I fogetting any?
If such
functions do not exist, any hint of what library should I use?

Depending on the functionality you need. If you're looking for
some kind of wrapper similar to TDate from Borland or whatever,
you should look at the "Available C++ Libraries FAQ" posted here
about monthly by Nikki Locke.

Victor
 
M

Mike Wahler

Luis Pedro said:
Hi Victor,
Thanks for your help. I'm already using the C Standard library for
this (e.g. ctime()). My question was more if there was any C++ library
equivalent to the C one, regarding the time and date stuff.

The C++ standard library, by definition, includes the
(C90) standard library. So, e.g. 'time()' etc. *are*
C++ standard library functions.

-Mike
 

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

Forum statistics

Threads
474,147
Messages
2,570,834
Members
47,382
Latest member
MichaleStr

Latest Threads

Top