This is a really dumb question and for some reason I'm totally blanking on it right about now. Inside my main-loop I'd like to have a pointer-to-pointer that points to an Screen-object pointer ( So if the screen pointer is assigned a new object to point towards the pointer-to-pointer is updated along.
However, I'm getting an error when trying to assign my pointer-to-pointer the screen pointer:
Screen* ScreenManager::activeScreen()
{
return m_screen;
}
Screen** s = &screenManager.activeScreen();
I'm getting the following error:
Error: expression must be an lvalue or function designator
However this works just fine:
Screen* p = screenManager.activeScreen();
Screen** s = &p;
I'm sure this is VERY simple, but I just keep blanking where the problem lies.