Re: typical problem in C... hot to solve
- From: "@$|-|. DUBEY" <dubey.ashwini@xxxxxxxxx>
- Date: Tue, 16 Dec 2008 04:57:33 -0800 (PST)
On Dec 12, 7:56 am, Jack Klein <jackkl...@xxxxxxxxxxx> wrote:
On Thu, 11 Dec 2008 02:06:49 -0800 (PST), "@$|-|. DUBEY"
<dubey.ashw...@xxxxxxxxx> wrote in comp.lang.c:
On Dec 11, 2:50 pm, nick_keighley_nos...@xxxxxxxxxxx wrote:
On 11 Dec, 09:08, "@$|-|. DUBEY" <dubey.ashw...@xxxxxxxxx> wrote:
hello every one.
i have this problem in c.
i have to check that the input date doesnot exceed the tomorrow date.
eg. if input date = 12-10-2004
then it should be always less than 12-12-2008
because today is 11-12-2008.
and input date should be valid one.
like jan is 30 days.
dec is 31 days.
feb is 28 ( if not leap year)....
how to solve this problem
how far have you got?
If I were you you I'd take a look at the stuff in time.h.
There's a reference herehttp://www.dinkumware.com/manuals/?manual=compleat&page=time.html
Start by writing a program to print today's date.
--
Nick Keighley
do you have some typical algorithm..
for this problem
i have current date.....
and user input date....
what's next....
Here's what's next, tell your employer to hire a qualified C
programmer. I've been doing embedded systems in C for more than 25
years, what will they pay someone who already knows how to do your
job?
--
Jack Klein
Home:http://JK-Technology.Com
FAQs for
comp.lang.chttp://c-faq.com/
comp.lang.c++http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
wow,
so rude,
some day i will have 25 years of experience and i wouldn't say these
words to any newbee.
man you think, you are trying to steal a lollypop from kid,
watch out.....
well see how i solved the problem
i have current date... ddmmyyy ( 12/12/2008 )
i have user date....ddmmyyy ( 14/03/1983 )
i reversed the both date to yyyddmm
so i get....
m_crnt_date = 20081212;
m_my_dob = 19831402;
since both are converted to integer formate
it can be compared....
if( m_my_dob >= m_crnt_date )
that's done...
can you comment on this......
.
- Follow-Ups:
- Re: typical problem in C... hot to solve
- From: td didi
- Re: typical problem in C... hot to solve
- From: Joachim Schmitz
- Re: typical problem in C... hot to solve
- References:
- typical problem in C... hot to solve
- From: @$|-|. DUBEY
- Re: typical problem in C... hot to solve
- From: nick_keighley_nospam
- Re: typical problem in C... hot to solve
- From: @$|-|. DUBEY
- Re: typical problem in C... hot to solve
- From: Jack Klein
- typical problem in C... hot to solve
- Prev by Date: comaprison b/w signed and unsigned
- Next by Date: Re: comaprison b/w signed and unsigned
- Previous by thread: Re: typical problem in C... hot to solve
- Next by thread: Re: typical problem in C... hot to solve
- Index(es):
Relevant Pages
|