Click here to Skip to main content
15,909,193 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Help me ! Question for variables in stack! Pin
Rage12-Apr-06 1:23
professionalRage12-Apr-06 1:23 
AnswerRe: Help me ! Question for variables in stack! Pin
Wessam Fathi12-Apr-06 1:28
Wessam Fathi12-Apr-06 1:28 
QuestionDynamic cast problem Pin
Abyss11-Apr-06 23:32
Abyss11-Apr-06 23:32 
AnswerRe: Dynamic cast problem Pin
Ștefan-Mihai MOGA12-Apr-06 0:44
professionalȘtefan-Mihai MOGA12-Apr-06 0:44 
AnswerRe: Dynamic cast problem Pin
sunit512-Apr-06 0:50
sunit512-Apr-06 0:50 
GeneralRe: Dynamic cast problem Pin
toxcct12-Apr-06 1:14
toxcct12-Apr-06 1:14 
GeneralRe: Dynamic cast problem Pin
sunit512-Apr-06 1:39
sunit512-Apr-06 1:39 
GeneralRe: Dynamic cast problem Pin
Abyss12-Apr-06 5:49
Abyss12-Apr-06 5:49 
Finally, I found the problem. Well I simplified my problem so much. In my case the problem is somewhere else:

A* ptr = new A;

Then I incorrectly static casted the pointer to a C object:

C* pObj = static_cast<C*>(ptr);

because of this the dynamic cast failed in VC8, however in VC7 it works fine. pTest will be NULL in VC8 and in VC7 it will be ptr.

A* pTest = dynamic_cast<A*>(pObj);

I know the given approach is incorrect - why to cast to C object?!
Just want to point out that VC8 is less tolerant... and this is good. On the other side in case of big projects the code migration to VC8 can cause big pains Mad | :mad:

Thanks, Abyss
AnswerRe: Dynamic cast problem Pin
Rage12-Apr-06 1:31
professionalRage12-Apr-06 1:31 
AnswerRe: Dynamic cast problem Pin
Stephen Hewitt12-Apr-06 4:44
Stephen Hewitt12-Apr-06 4:44 
QuestionCryptography Pin
kiran janaswamy11-Apr-06 23:27
kiran janaswamy11-Apr-06 23:27 
QuestionReinstance COM Object in C++ Pin
MarcoNedwig11-Apr-06 23:22
MarcoNedwig11-Apr-06 23:22 
AnswerRe: Reinstance COM Object in C++ Pin
RChin11-Apr-06 23:35
RChin11-Apr-06 23:35 
GeneralRe: Reinstance COM Object in C++ Pin
MarcoNedwig12-Apr-06 0:01
MarcoNedwig12-Apr-06 0:01 
GeneralRe: Reinstance COM Object in C++ Pin
RChin12-Apr-06 0:50
RChin12-Apr-06 0:50 
GeneralRe: Reinstance COM Object in C++ Pin
MarcoNedwig12-Apr-06 1:15
MarcoNedwig12-Apr-06 1:15 
QuestionUrgent - How do i programatically display submenu items window Pin
giftsana11-Apr-06 23:19
giftsana11-Apr-06 23:19 
AnswerRe: Urgent - How do i programatically display submenu items window Pin
kiran janaswamy11-Apr-06 23:32
kiran janaswamy11-Apr-06 23:32 
GeneralRe: Urgent - How do i programatically display submenu items window Pin
giftsana11-Apr-06 23:37
giftsana11-Apr-06 23:37 
GeneralRe: Urgent - How do i programatically display submenu items window Pin
thatsme_cool12-Apr-06 0:38
thatsme_cool12-Apr-06 0:38 
AnswerRe: Urgent - How do i programatically display submenu items window Pin
Hamid_RT12-Apr-06 1:31
Hamid_RT12-Apr-06 1:31 
GeneralRe: Urgent - How do i programatically display submenu items window Pin
giftsana12-Apr-06 15:51
giftsana12-Apr-06 15:51 
Questionhyperlink copyright name Pin
Ștefan-Mihai MOGA11-Apr-06 23:13
professionalȘtefan-Mihai MOGA11-Apr-06 23:13 
AnswerRe: hyperlink copyright name Pin
Ravi Bhavnani12-Apr-06 5:08
professionalRavi Bhavnani12-Apr-06 5:08 
QuestionAudio drivers: hook up audio streams Pin
imsaady11-Apr-06 23:09
imsaady11-Apr-06 23:09 

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.