0

Hello everyone, i write mostly in java but have recently started picking up c and c++, and i was wondering if there was an equivalent to the java date class in c++ or c? I've searched for a date.h and came up empty.

Edited by Digitalwolf: n/a

2
Contributors
2
Replies
5
Views
5 Years
Discussion Span
Last Post by Digitalwolf
0

The standard library equivalent can be found in the <time.h> header (or <ctime> for C++). But being used to Java's Date and Calendar classes, you'll probably find the interface either quaint or woefully inadequate.

p.s. I fairly recently posted a code snippet for for the beginnings of a date_time class that may be closer to what you're used to.

0

Thank you, yes <time.h> was what i was hoping for, it might not have everything Date does, but it still gives you the basics to work with, more than enough for me.

ps: the response time was amazing. :)

Edited by Digitalwolf: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.