#include "view.h" view::view(model* what_I_watch) { my_model = what_I_watch; my_model->add_dependent(this); // let my_model know that I'm watching! } model* view::get_model() { return my_model; } void view::update() { // by default, do nothing... }