|
I just tried this bit of code and it always returns me 31. even the parameters to the function when passed as 2000,2 returns 31. ??? Any reasons. I modified my last post to include this.
BTW does this code execute as expected at your end.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: BTW does this code execute as expected at your end.
yes. it returns 29.
Is it because of some OS environment problem ?I am running on windows XP with SP2.
|
|
|
|
|
Same here [WinXP SP2]. but it always returns 31. Will try and find the reason behind this behaviour and get back if possible.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can any one else tell us whats the behavior in your machines??
|
|
|
|
|
It returns 29.
I have XP and SP2
Regards,
Sandip.
|
|
|
|
|
|
It returns 29,dont worry your code is correct.
|
|
|
|
|
|
BTW does your problem solve I think it was about threads,right?
|
|
|
|
|
Hamid. wrote: does your problem solve
That Delete file problem??nop. I failed to find a working solution.
Any way I updated my article. I have metioned the problem and have asked to tell me if any one finds some other solutions.
|
|
|
|
|
2 down votes . Seems some body doesn't like the idea.
|
|
|
|
|
Now see it again, its 3.3(dont forget our gold members ).
|
|
|
|
|
Hamid. wrote: Now see it again, its 3.3
Thanks Buddy..
|
|
|
|
|
Its 3.5 now
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
Thanks BadKarma, So you does some Good-Karma's also, haaaa?
|
|
|
|
|
Yeah,
thats the Dark Side of me
Learn from the mistakes of others, you may not live long enough to make them all yourself.
|
|
|
|
|
Should I repeat myself?
int daysOfMonth(int month, int year)
{
switch( month )
{
case 4:
case 6:
case 9:
case 11:
return 30;
case 2:
return year % 400 ? year % 100 ? year % 4 ? 28 : 29 : 28 : 29;
default:
return 31;
}
}
:-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Other code of your magic site,right?
|
|
|
|
|
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
There is an unjustified low-vote here[^]. I wish you were there.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Done, wily old fox.
Now could you down vote a unjustified criticism here [^]
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
You're such a badass.
Thanks for the vote BTW.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
You know? I've been showing what you did (this leap year thing) to my Team Lead and we both were laughing out loud in the office. He said "this guy is a good programmer and has an excellent sense of humor too", for which I said "I know".
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Oh, thank you
BTW I was really embarassed, clicking firstly the vote button (I just intended to reply).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
I would like some basic orientation in setting up a time limit in a demo.
I assume that the time of initial installation is stored somewhere. Where should it be stored ?
I am writing in C with Visual Studio 6,7, or 8.
Raymond Mercier
|
|
|
|