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

C / C++ / MFC

 
GeneralRe: CMenus : How to use menu handles instead of menu resource ID when needed ? Pin
Richard MacCutchan16-Sep-14 2:29
mveRichard MacCutchan16-Sep-14 2:29 
GeneralRe: CMenus : How to use menu handles instead of menu resource ID when needed ? Pin
CPallini16-Sep-14 2:45
mveCPallini16-Sep-14 2:45 
QuestionPassing a class to a sprintf() and similar Pin
Crazy Joe Devola14-Sep-14 19:45
Crazy Joe Devola14-Sep-14 19:45 
AnswerRe: Passing a class to a sprintf() and similar Pin
CPallini14-Sep-14 20:01
mveCPallini14-Sep-14 20:01 
GeneralRe: Passing a class to a sprintf() and similar Pin
Crazy Joe Devola14-Sep-14 20:07
Crazy Joe Devola14-Sep-14 20:07 
GeneralRe: Passing a class to a sprintf() and similar Pin
CPallini15-Sep-14 2:15
mveCPallini15-Sep-14 2:15 
GeneralRe: Passing a class to a sprintf() and similar Pin
Richard MacCutchan16-Sep-14 2:59
mveRichard MacCutchan16-Sep-14 2:59 
GeneralRe: Passing a class to a sprintf() and similar Pin
CPallini16-Sep-14 3:11
mveCPallini16-Sep-14 3:11 
It is not rubbish, in my test (VS2012). It is pointer to the C1 object, having the same address of its first data member (m_Data) in this simple case, so everything goes right (of course if you insert, before m_Data, another member variable, for instance an int, the sprintf gets some garbage).

In the linked MSDN page they indded suggest to explicitely cast the CString object when used as sprintf parameter.
THESE PEOPLE REALLY BOTHER ME!! How can they know what you should do without knowing what you want done?!?!
-- C++ FQA Lite

GeneralRe: Passing a class to a sprintf() and similar Pin
Richard MacCutchan16-Sep-14 3:40
mveRichard MacCutchan16-Sep-14 3:40 
GeneralRe: Passing a class to a sprintf() and similar Pin
Richard MacCutchan16-Sep-14 4:04
mveRichard MacCutchan16-Sep-14 4:04 
GeneralRe: Passing a class to a sprintf() and similar Pin
Bram van Kampen16-Sep-14 16:45
Bram van Kampen16-Sep-14 16:45 
AnswerRe: Passing a class to a sprintf() and similar Pin
Richard MacCutchan16-Sep-14 4:04
mveRichard MacCutchan16-Sep-14 4:04 
GeneralRe: Passing a class to a sprintf() and similar Pin
CPallini16-Sep-14 4:33
mveCPallini16-Sep-14 4:33 
GeneralRe: Passing a class to a sprintf() and similar Pin
Richard MacCutchan16-Sep-14 5:03
mveRichard MacCutchan16-Sep-14 5:03 
GeneralRe: Passing a class to a sprintf() and similar Pin
CPallini16-Sep-14 5:13
mveCPallini16-Sep-14 5:13 
GeneralRe: Passing a class to a sprintf() and similar Pin
Richard MacCutchan16-Sep-14 5:30
mveRichard MacCutchan16-Sep-14 5:30 
GeneralRe: Passing a class to a sprintf() and similar Pin
jschell16-Sep-14 8:40
jschell16-Sep-14 8:40 
GeneralRe: Passing a class to a sprintf() and similar Pin
Albert Holguin16-Sep-14 8:42
professionalAlbert Holguin16-Sep-14 8:42 
GeneralRe: Passing a class to a sprintf() and similar Pin
jschell17-Sep-14 9:51
jschell17-Sep-14 9:51 
GeneralRe: Passing a class to a sprintf() and similar Pin
Crazy Joe Devola16-Sep-14 11:20
Crazy Joe Devola16-Sep-14 11:20 
QuestionI need your help Pin
Member 1107406614-Sep-14 16:07
Member 1107406614-Sep-14 16:07 
GeneralRe: I need your help Pin
CPallini14-Sep-14 18:46
mveCPallini14-Sep-14 18:46 
QuestionCan i trust the result of clock_getres? Pin
elelont212-Sep-14 1:34
elelont212-Sep-14 1:34 
AnswerRe: Can i trust the result of clock_getres? Pin
Stefan_Lang12-Sep-14 1:50
Stefan_Lang12-Sep-14 1:50 
AnswerRe: Can i trust the result of clock_getres? Pin
CPallini12-Sep-14 2:49
mveCPallini12-Sep-14 2:49 

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.