Click here to Skip to main content
15,888,031 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHead files include each other Pin
xyhan22-Feb-06 13:19
xyhan22-Feb-06 13:19 
AnswerRe: Head files include each other Pin
DaveCarkeet22-Feb-06 14:33
DaveCarkeet22-Feb-06 14:33 
Questioninclude each other Pin
xyhan22-Feb-06 13:16
xyhan22-Feb-06 13:16 
AnswerRe: include each other Pin
cmk22-Feb-06 13:26
cmk22-Feb-06 13:26 
GeneralRe: include each other Pin
xyhan22-Feb-06 14:02
xyhan22-Feb-06 14:02 
AnswerRe: include each other Pin
Joe Woodbury22-Feb-06 13:54
professionalJoe Woodbury22-Feb-06 13:54 
QuestionQuestion: localtime() Pin
Yonggoo22-Feb-06 13:05
Yonggoo22-Feb-06 13:05 
AnswerRe: Question: localtime() Pin
cmk22-Feb-06 13:24
cmk22-Feb-06 13:24 
Short answer:
The prototype for localtime is:
struct tm *localtime(const time_t *timer);
You are passing a long* not a time_t*.

Longer answer:
time_t is a long in 32-bit OS's but a __int64 in 64-bit OS's.
As time_t has been a long for a long time (no pun intended) many developers found it more convenient to just use a long.
In VS2005 time_t is a __int64 unless _USE_32BIT_TIME_T is defined.
So, in reality you are passing a long* to a function expecting a __int64*.
Just use time_t, there is a reason it is defined as a distinct type.

e.g.
time_t totalSeconds = (time_t)(dSeconds +.5);
struct tm *myTime = localtime(&totalSeconds);


...cmk

Save the whales - collect the whole set
QuestionProfiler for VS 2005 Pin
Jack Puppy22-Feb-06 11:38
Jack Puppy22-Feb-06 11:38 
AnswerRe: Profiler for VS 2005 Pin
Joe Woodbury22-Feb-06 17:42
professionalJoe Woodbury22-Feb-06 17:42 
QuestionCSocket Memory Leak Pin
Dave Regan22-Feb-06 11:31
Dave Regan22-Feb-06 11:31 
QuestionCursor Issues Pin
#realJSOP22-Feb-06 11:07
mve#realJSOP22-Feb-06 11:07 
AnswerRe: Cursor Issues Pin
Ryan Binns22-Feb-06 17:19
Ryan Binns22-Feb-06 17:19 
GeneralRe: Cursor Issues Pin
#realJSOP23-Feb-06 2:20
mve#realJSOP23-Feb-06 2:20 
QuestionSetupDiRemoveDevice() Pin
Manu_8122-Feb-06 10:31
Manu_8122-Feb-06 10:31 
QuestionDisable Task Manager from MFC Pin
JBAK_CP22-Feb-06 10:30
JBAK_CP22-Feb-06 10:30 
AnswerRe: Disable Task Manager from MFC Pin
super22-Feb-06 12:04
professionalsuper22-Feb-06 12:04 
GeneralRe: Disable Task Manager from MFC Pin
JBAK_CP24-Feb-06 12:26
JBAK_CP24-Feb-06 12:26 
QuestionAll member variables contain same value Pin
BuckBrown22-Feb-06 8:44
BuckBrown22-Feb-06 8:44 
AnswerRe: All member variables contain same value Pin
Joe Woodbury22-Feb-06 9:22
professionalJoe Woodbury22-Feb-06 9:22 
GeneralRe: All member variables contain same value Pin
BuckBrown22-Feb-06 10:55
BuckBrown22-Feb-06 10:55 
GeneralRe: All member variables contain same value Pin
Joe Woodbury22-Feb-06 11:00
professionalJoe Woodbury22-Feb-06 11:00 
GeneralRe: All member variables contain same value Pin
BuckBrown22-Feb-06 11:06
BuckBrown22-Feb-06 11:06 
GeneralRe: All member variables contain same value Pin
Joe Woodbury22-Feb-06 11:14
professionalJoe Woodbury22-Feb-06 11:14 
GeneralRe: All member variables contain same value Pin
BuckBrown22-Feb-06 12:59
BuckBrown22-Feb-06 12:59 

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.