void pointers
I faced with an interesting issue. Here is the code:
1. Working:
void GameScreenPresenter::activate()
{
IScreen* scr = &view;
scr->Func();
}
2. Doesn't work:
void GameScreenPresenter::activate()
{
void* ptr = &view;
IScreen* scr = static_cast<IScreen*>(ptr);
scr->Func();
}
Seems like in the second option scr just nullptr. Why?
