Morning Discussion
by Chris Faylor, Feb 26, 2009 7:22am PSTThursday? Yeah, no problem. I can do Thursday.
Starting to get a bit excited about this weekend's Frisco/Dallas Shackmeet of laser tag, bowling, gelato and doom. Maarten and I are both flying in tomorrow afternoon, as to not miss a moment of the Saturday hijinks. It's my first Shackmeet. Please, be gentle.
In unrelated news, you can now snag Duke Nukem 3D on PC for a paltry $6.
Wargame: Airland Battle trailer details dynamic campaign
Halo 'Bootcamp' confirmed by Microsoft
Weekend PC download deals: Tomb Raider for $14
Game Dev Tycoon studio outlines future plans
Baldur's Gate 2 Enhanced already has 350,000 words of new content



I tried searching on msdn/google but I couldn't find an answer for this; why can't static_cast upcast/downcast on double ptr's?
class A
{
};
class B : public A
{
};
int _tmain(int argc, _TCHAR* argv[])
{
B** ppB = NULL;
A** ppA = static_cast<A**>(ppB);
return 0;
}
says:
error C2440: 'static_cast' : cannot convert from 'B **' to 'A **'
Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
but
B* pB = NULL;
A* pA = static_cast<A*>(pB);
works.
Thread Truncated. Click to see all 20 replies.
You must be logged in to post.