I'm new to C++, I want to understand why I can't use the dot (.) operator here, since the variable is declared inside the class.
class SessionController {
private: SessionView view;
private: Session model;
public: SessionController (SessionView view, Session model) {
this.view = view;
this->model = model;
}
};
I'm getting an error at this.view = view;
saying
Member reference type 'SessionController *' is a pointer; did you mean to use '->'?