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

C / C++ / MFC

 
GeneralRe: x64 intrinsic function equivalent for inline assembly? Pin
Mike Dimmick25-Apr-08 3:44
Mike Dimmick25-Apr-08 3:44 
Questiongdiplus problem Pin
trioum25-Apr-08 0:11
trioum25-Apr-08 0:11 
GeneralRe: gdiplus problem Pin
Rajkumar R25-Apr-08 0:29
Rajkumar R25-Apr-08 0:29 
GeneralRe: gdiplus problem Pin
Prasann Mayekar25-Apr-08 1:36
Prasann Mayekar25-Apr-08 1:36 
GeneralRe: gdiplus problem Pin
Hamid_RT25-Apr-08 3:04
Hamid_RT25-Apr-08 3:04 
Questionconnect dowsnt return error when i execute it with a disabled NIC?(windows sockets) Pin
izrafel24-Apr-08 23:28
izrafel24-Apr-08 23:28 
QuestionQuestion about downcast in c++ Pin
fantasy121524-Apr-08 23:23
fantasy121524-Apr-08 23:23 
GeneralRe: Question about downcast in c++ Pin
BadKarma24-Apr-08 23:57
BadKarma24-Apr-08 23:57 
fantasy1215 wrote:
//really don't know why could downcast like this?

Simple, because you can, this however doesn't mean you should.
This is a post fitting to be posted in the horror forum.

<code>A a(0);</code>
no problem creating an A object on the stack

<code>B *pb1 = (B *)&a;  //really don't know why could downcast like this?</code>
Argh, creating a pointer to a B object on the stack and assign it the address of the A object

<code>pb1->fun1();</code>
this should work -> "B::fun1"

<code>pb1->fun2();  //here don't know why</code>
this should work also -> "B::fun2"

<code>pb1->fun3();  //here how to initialize the bdata in class B?</code>
The hell has just opened up and corrupted the stack arround the A object
by the the execution of <code>bdata = 3; bdata++;</code>

return 0;


codito ergo sum

QuestionRe: Question about downcast in c++ Pin
Rajkumar R25-Apr-08 0:00
Rajkumar R25-Apr-08 0:00 
QuestionWireless network message Pin
Ajay L D24-Apr-08 23:22
Ajay L D24-Apr-08 23:22 
GeneralRe: Wireless network message PinPopular
Rajkumar R25-Apr-08 0:34
Rajkumar R25-Apr-08 0:34 
Questionwhat about WM_CLOSE ,WM_DESTROY and WM_QUIT? Pin
xqhrs23224-Apr-08 23:13
xqhrs23224-Apr-08 23:13 
AnswerRe: what about WM_CLOSE ,WM_DESTROY and WM_QUIT? Pin
Rajkumar R25-Apr-08 0:50
Rajkumar R25-Apr-08 0:50 
AnswerRe: what about WM_CLOSE ,WM_DESTROY and WM_QUIT? Pin
David Crow25-Apr-08 3:08
David Crow25-Apr-08 3:08 
GeneralRe: what about WM_CLOSE ,WM_DESTROY and WM_QUIT? Pin
Michael Schubert25-Apr-08 4:30
Michael Schubert25-Apr-08 4:30 
GeneralRe: what about WM_CLOSE ,WM_DESTROY and WM_QUIT? Pin
David Crow25-Apr-08 4:40
David Crow25-Apr-08 4:40 
GeneralRe: what about WM_CLOSE ,WM_DESTROY and WM_QUIT? Pin
Michael Schubert25-Apr-08 4:50
Michael Schubert25-Apr-08 4:50 
GeneralRe: what about WM_CLOSE ,WM_DESTROY and WM_QUIT? Pin
Nelek27-Apr-08 1:45
protectorNelek27-Apr-08 1:45 
AnswerRe: what about WM_CLOSE ,WM_DESTROY and WM_QUIT? PinPopular
Mike Dimmick25-Apr-08 4:28
Mike Dimmick25-Apr-08 4:28 
GeneralSystem Security Center Pin
Jangid24-Apr-08 22:55
Jangid24-Apr-08 22:55 
GeneralCopy file issue Pin
VCsamir24-Apr-08 21:59
VCsamir24-Apr-08 21:59 
GeneralRe: Copy file issue Pin
CPallini24-Apr-08 22:57
mveCPallini24-Apr-08 22:57 
GeneralRe: Copy file issue Pin
Hamid_RT25-Apr-08 3:09
Hamid_RT25-Apr-08 3:09 
QuestionCreateProcessWithLogonW Pin
Ajay L D24-Apr-08 21:29
Ajay L D24-Apr-08 21:29 
GeneralRe: CreateProcessWithLogonW Pin
Rajkumar R24-Apr-08 22:17
Rajkumar R24-Apr-08 22:17 

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.