Welcome to Dream.In.Code
Getting C++ Help is Easy!

Join 136,167 C++ Programmers for FREE! Get instant access to thousands of C++ experts, tutorials, code snippets, and more! There are 1,903 people online right now. Registration is fast and FREE... Join Now!




Time.h

 
Reply to this topicStart new topic

Time.h, analysis of the time header

gotsomekicks
15 Dec, 2007 - 07:01 AM
Post #1

New D.I.C Head
*

Joined: 15 Nov, 2007
Posts: 3


My Contributions
Hello folks, I am Damien. Great forum BTW icon_up.gif.

1) Does anyone know where I can find a detailed analysis of time.h (functions and all)? I've searched the web and all that I was able to find were lists of the functions. Even wikipedia's article is pretty shallow. I need something thorough and well-thought. Perhaps some older C documentation?

2) Also, can you please tell me which is the farthest date I can print on screen using a function from time.h?

I would greatly appreciate your help, and I look forward to the moment when I'll be skilled enough in C/C++ to be able to help others here smile.gif. Cheers, and thanks in advance.

This post has been edited by gotsomekicks: 15 Dec, 2007 - 07:02 AM
User is offlineProfile CardPM
+Quote Post

mattman059
RE: Time.h
15 Dec, 2007 - 07:34 AM
Post #2

D.I.C Regular
Group Icon

Joined: 23 Oct, 2006
Posts: 340


Dream Kudos: 175
My Contributions
http://www.cplusplus.com/reference/clibrary/ctime/
Just click the function name, or variable name and it will give you an example of how to use it
Great reference site for much of the C++ library

This post has been edited by mattman059: 15 Dec, 2007 - 07:35 AM
User is offlineProfile CardPM
+Quote Post

gotsomekicks
RE: Time.h
15 Dec, 2007 - 08:19 AM
Post #3

New D.I.C Head
*

Joined: 15 Nov, 2007
Posts: 3


My Contributions
Thanks a lot mattman059. I'm doing this as a project for my "C programming" class, so, is there any difference between the time.h used in C++ and the one used in C?

Also, what about my second question?
User is offlineProfile CardPM
+Quote Post

Bench
RE: Time.h
15 Dec, 2007 - 10:34 AM
Post #4

D.I.C Addict
Group Icon

Joined: 20 Aug, 2007
Posts: 617



Thanked: 14 times
Dream Kudos: 150
Expert In: C/C++

My Contributions
in C++, the <time.h> header is deprecated by the standard, and may be removed in some future version, so its good practice to use <ctime> instead in C++ programs.
Since you're studying 'C', which is a completely different language to C++, you have no choice but to use <time.h>, so don't worry about it.


The size of time_t isn't specified by the standard, so the latest possible date that you can represent with it is platform-defined.
User is offlineProfile CardPM
+Quote Post

Reply to this topicStart new topic
Time is now: 12/2/08 12:12AM

Live C++ Help!

C++ Tutorials

Reference Sheets

C++ Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month