Click here to Skip to main content
16,005,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: API List Control Help Pin
David Crow7-Mar-06 9:14
David Crow7-Mar-06 9:14 
AnswerRe: API List Control Help Pin
Greg Barnes7-Mar-06 9:58
Greg Barnes7-Mar-06 9:58 
QuestionRe: API List Control Help Pin
David Crow7-Mar-06 10:29
David Crow7-Mar-06 10:29 
AnswerRe: API List Control Help Pin
James R. Twine7-Mar-06 10:30
James R. Twine7-Mar-06 10:30 
GeneralRe: API List Control Help Pin
Greg Barnes7-Mar-06 11:03
Greg Barnes7-Mar-06 11:03 
QuestionCritical sections Pin
hint_547-Mar-06 7:42
hint_547-Mar-06 7:42 
AnswerRe: Critical sections Pin
Joe Woodbury7-Mar-06 8:15
professionalJoe Woodbury7-Mar-06 8:15 
Questionmktime() Pin
DanYELL7-Mar-06 6:58
DanYELL7-Mar-06 6:58 
I am super stuck and very frustrated. I have a simple date time control.
If I put in a date from 1970 on, everything works fine. If I put in a
date that is less than or includes 1969, the program crashes at the bottom
on the ASSERT line which is the last line of this code:

CTime::CTime(int nYear, int nMonth, int nDay, int nHour, int nMin, int nSec,
int nDST)
{
struct tm atm;
atm.tm_sec = nSec;
atm.tm_min = nMin;
atm.tm_hour = nHour;
ASSERT(nDay >= 1 && nDay <= 31);
atm.tm_mday = nDay;
ASSERT(nMonth >= 1 && nMonth <= 12);
atm.tm_mon = nMonth - 1; // tm_mon is 0 based
ASSERT(nYear >= 1900);
atm.tm_year = nYear - 1900; // tm_year is 1900 based
atm.tm_isdst = nDST;
m_time = mktime(&atm);
ASSERT(m_time != -1); // indicates an illegal input time
}

Looking at the call stack, the input is:

CTime::CTime(int 1960, int 6, int 3, int 0, int 0, int 0, int -1)

I tried changing the nDST to 0 or 1 and that doesnt stop the error from
coming.

Any ideas? Any chance I can email someone a small sample project that
keeps displaying this error?

Please, any response any one can give me will be greatly appreciated.

Sincerely,
Danielle Brina (an overworked graduate student)
AnswerRe: mktime() Pin
David Crow7-Mar-06 7:06
David Crow7-Mar-06 7:06 
GeneralRe: mktime() Pin
DanYELL7-Mar-06 7:10
DanYELL7-Mar-06 7:10 
GeneralRe: mktime() Pin
David Crow7-Mar-06 7:16
David Crow7-Mar-06 7:16 
GeneralRe: mktime() Pin
DanYELL7-Mar-06 8:17
DanYELL7-Mar-06 8:17 
AnswerRe: mktime() Pin
Michael Dunn7-Mar-06 11:07
sitebuilderMichael Dunn7-Mar-06 11:07 
GeneralRe: mktime() Pin
Nibu babu thomas7-Mar-06 17:14
Nibu babu thomas7-Mar-06 17:14 
Questionabout write code from ASM. Pin
HOW WHAT7-Mar-06 6:05
HOW WHAT7-Mar-06 6:05 
QuestionHey - what happened to "how to get an answer to your question"? Pin
James R. Twine7-Mar-06 5:23
James R. Twine7-Mar-06 5:23 
AnswerRe: Hey - what happened to "how to get an answer to your question"? Pin
Nish Nishant7-Mar-06 5:25
sitebuilderNish Nishant7-Mar-06 5:25 
GeneralRe: Hey - what happened to "how to get an answer to your question"? Pin
James R. Twine7-Mar-06 5:28
James R. Twine7-Mar-06 5:28 
AnswerRe: Hey - what happened to "how to get an answer to your question"? Pin
David Crow7-Mar-06 5:32
David Crow7-Mar-06 5:32 
Questionwhat is private & static function-MFC Pin
beardy janggut7-Mar-06 5:18
beardy janggut7-Mar-06 5:18 
AnswerRe: what is private & static function-MFC Pin
Nish Nishant7-Mar-06 5:27
sitebuilderNish Nishant7-Mar-06 5:27 
AnswerRe: what is private &amp; static function-MFC Pin
toxcct7-Mar-06 5:37
toxcct7-Mar-06 5:37 
AnswerRe: what is private & static function-MFC Pin
Gary R. Wheeler7-Mar-06 5:57
Gary R. Wheeler7-Mar-06 5:57 
AnswerRe: what is private & static function-MFC Pin
Eytukan7-Mar-06 20:43
Eytukan7-Mar-06 20:43 
QuestionHOTKEY......(Urgent pls) Pin
RockyJames7-Mar-06 5:07
RockyJames7-Mar-06 5:07 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.