Your problem seems to be that you have a circular dependency: ListWindow contains a pointer to a HistoryWindow and vice versa. You have to add a forward declaration to listwindow.h and historywindow.h. (see here for details)