explicit casting

Started by
1 comment, last by Yohomyth 19 years, 10 months ago
Whenever I try to convert from void* to a class (like CWnd*) it says explicit casting required. How do you do that? (I'm using VC6) ----------------------------------------------- Here comes the Thnikkaman! [edited by - Yohomyth on May 29, 2004 3:26:32 PM]
------------------------------------------------------------"Many combilations elizagerth. I hope you see my particles." - Senor Cardgage
Advertisement

void * some_pointer;

CWnd * window1 = reinterpret_cast<CWnd *>(some_pointer);
CWnd * window2 = (CWnd *)some_pointer;


[edited by - SiCrane on May 29, 2004 3:30:15 PM]
Wierd...that''s exactly what i was doing but it just now worked. Maybe i was missing something else.



-----------------------------------------------
Here comes the Thnikkaman!
------------------------------------------------------------"Many combilations elizagerth. I hope you see my particles." - Senor Cardgage

This topic is closed to new replies.

Advertisement