Click here to Skip to main content
15,896,912 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: data base connectivity Pin
David Crow5-Feb-07 4:57
David Crow5-Feb-07 4:57 
Questionhow can i calculate an angle between pointer of a clock by any time? Pin
Yanshof4-Feb-07 19:40
Yanshof4-Feb-07 19:40 
AnswerRe: how can i calculate an angle between pointer of a clock by any time? Pin
Christian Graus4-Feb-07 19:56
protectorChristian Graus4-Feb-07 19:56 
GeneralRe: how can i calculate an angle between pointer of a clock by any time? Pin
Mark Salsbery5-Feb-07 7:32
Mark Salsbery5-Feb-07 7:32 
GeneralRe: how can i calculate an angle between pointer of a clock by any time? Pin
Christian Graus5-Feb-07 8:54
protectorChristian Graus5-Feb-07 8:54 
AnswerRe: how can i calculate an angle between pointer of a clock by any time? Pin
Stephen Hewitt4-Feb-07 20:19
Stephen Hewitt4-Feb-07 20:19 
GeneralRe: how can i calculate an angle between pointer of a clock by any time? Pin
kasturi_haribabu4-Feb-07 21:12
kasturi_haribabu4-Feb-07 21:12 
QuestionLoging System Time & Date Error Pin
Suresh H4-Feb-07 19:38
Suresh H4-Feb-07 19:38 
Hello all,

I am trying to log the system date and time in the log file in my win 32 application.

I have used below code.

outf.open("C:\\Log.txt",ios::app); <br />
SYSTEMTIME st;<br />
::SendMessage(hwnd, DTM_GETSYSTEMTIME, 0, (LPARAM)&st);<br />
LPTSTR lpDateTime = new TCHAR[21];<br />
_stprintf(lpDateTime, _T("%02u/%02u/%04u %2u:%2u:%2u"),<br />
	st.wMonth, st.wDay, st.wYear,st.wHour, st.wMinute, st.wSecond);<br />
outf << "Current selected time: " << lpDateTime;<br />
delete []lpDateTime;<br />
outf.close();


and I am getting out put as :-

Current selected time: 52428/52428/52428 52428:52428:52428

Can anyone help me with this why I am not getting the proper time and date ???

And also this code has no compiler errors I am getting run time error for this line

delete []lpDateTime;


debug error :-

Microsoft Visual C++ Debug Library

Debug Error !

Damage : after normal block (# 45) at 0X0071DAO



Why I am getting the debug error ???? delete []lpDateTime; is correct way right ??

Thanking you,
Suresh HC.
AnswerRe: Loging System Time & Date Error Pin
Naveen4-Feb-07 20:30
Naveen4-Feb-07 20:30 
GeneralRe: Loging System Time & Date Error Pin
Suresh H4-Feb-07 21:28
Suresh H4-Feb-07 21:28 
QuestionRe: Loging System Time & Date Error Pin
David Crow5-Feb-07 5:08
David Crow5-Feb-07 5:08 
AnswerRe: Loging System Time & Date Error Pin
Naveen5-Feb-07 16:14
Naveen5-Feb-07 16:14 
GeneralRe: Loging System Time &amp; Date Error Pin
David Crow6-Feb-07 3:06
David Crow6-Feb-07 3:06 
AnswerRe: Loging System Time & Date Error Pin
Don Box4-Feb-07 20:39
Don Box4-Feb-07 20:39 
GeneralRe: Loging System Time & Date Error Pin
Suresh H4-Feb-07 21:29
Suresh H4-Feb-07 21:29 
AnswerRe: Loging System Time & Date Error Pin
kasturi_haribabu4-Feb-07 20:59
kasturi_haribabu4-Feb-07 20:59 
GeneralRe: Loging System Time & Date Error Pin
Suresh H4-Feb-07 21:31
Suresh H4-Feb-07 21:31 
QuestionRe: Loging System Time & Date Error Pin
David Crow5-Feb-07 5:08
David Crow5-Feb-07 5:08 
AnswerRe: Loging System Time & Date Error Pin
Suresh H5-Feb-07 18:29
Suresh H5-Feb-07 18:29 
GeneralRe: Loging System Time & Date Error Pin
David Crow6-Feb-07 2:38
David Crow6-Feb-07 2:38 
AnswerRe: Loging System Time & Date Error Pin
Hamid_RT14-Feb-07 6:39
Hamid_RT14-Feb-07 6:39 
Questionexternal user authentication Pin
apoorva_raje4-Feb-07 19:06
apoorva_raje4-Feb-07 19:06 
AnswerRe: external user authentication Pin
Hamid_RT14-Feb-07 6:29
Hamid_RT14-Feb-07 6:29 
Questionerror C2248 : After converting to .net Pin
sheetal_064-Feb-07 18:09
sheetal_064-Feb-07 18:09 
QuestionPointer Math: Bad Code Generation (VS 7.0 and 8.0) Pin
Jeffrey Walton4-Feb-07 17:25
Jeffrey Walton4-Feb-07 17:25 

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.