can anyone here who knows where can i find the posted one problem that is to convert the month-day-year birthday to a simple day like sunday?? and who knows the answer to this problem using getdate setdate??
technogeek_42 -20 Posting Whiz in Training
Recommended Answers
Jump to Post"Explanation" in the comments:
#include <iostream> #include <ctime> int main() { /** * Fill a struct tm. */ struct tm date = {0}; date.tm_year = 108; // 2008 date.tm_mon = 1; // February date.tm_mday = 19; // 19 /** * Normalize it. */ time_t normal = std::mktime(&date); …
Jump to PostThat's standard C++ -- except that I may have missed a
std::
ontm
,time_t
, andasctime
.I'd much rather use that than nonstandard
getdate
andsetdate
because the standard stuff is guaranteed to be there whereas the nonstandard stuff is not.
Jump to Post
using namespace std;
When you're not a beginner, unlearn this.
Jump to Post[deleted]
Jump to Postnever heard of getdate() and setdate(). But time.h, or ctime, has similar standard C functions getsystime() and setsystime().
[edit]After looking at the link Nick posted I realize they are not the same afterall.[/edit]
@technogeek: (you name is a misnomer). If you scroll down to the bottom of nick's …
All 25 Replies
John A 1,896 Vampirical Lurker Team Colleague
Dave Sinkula 2,398 long time no c Team Colleague
technogeek_42 -20 Posting Whiz in Training
Dave Sinkula 2,398 long time no c Team Colleague
technogeek_42 -20 Posting Whiz in Training
Dave Sinkula 2,398 long time no c Team Colleague
technogeek_42 -20 Posting Whiz in Training
Dave Sinkula 2,398 long time no c Team Colleague
John A commented: Or how about an umbilical cord? :P +14
technogeek_42 -20 Posting Whiz in Training
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
technogeek_42 -20 Posting Whiz in Training
mitrmkar 1,056 Posting Virtuoso
Nick Evan 4,005 Industrious Poster Team Colleague Featured Poster
technogeek_42 -20 Posting Whiz in Training
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
technogeek_42 -20 Posting Whiz in Training
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
technogeek_42 -20 Posting Whiz in Training
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
technogeek_42 -20 Posting Whiz in Training
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
technogeek_42 -20 Posting Whiz in Training
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
technogeek_42 -20 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.