I'd like to write a function in C that takes the current system date adds a user defined number of days and returns the new date. Im new to C so Id like any suggestions . Thanks in Advance.
abaran01 0 Newbie Poster
Recommended Answers
Jump to PostIve searched the web but found little help.
Jump to Post1. get current time in the form of struct tm (two function calls to do that)
2. Get number of days from user
3. Add days from #2 above to tm_mday obtains in #1 above
4. call mktime() to normalize all struct tm members.
Note: you …
All 5 Replies
jephthah 1,888 Posting Maven
abaran01 0 Newbie Poster
jephthah 1,888 Posting Maven
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
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.